Page MenuHomeDevCentral
Paste P326

Patch against 3d-ascii-viewer-c src/model.c
ActivePublic

Authored by dereckson on Apr 25 2023, 22:25.
Tags
None
Referenced Files
F2210446: Patch against 3d-ascii-viewer-c src/model.c
Apr 25 2023, 22:25
Subscribers
None
diff --git a/src/model.c b/src/model.c
index 86e6543..e9b1304 100644
--- a/src/model.c
+++ b/src/model.c
@@ -25,6 +25,8 @@ static struct model *model_init(void)
exit(1);
}
model->vertex_count = 0;
+
+ return model;
}
static void model_add_vertex(struct model *model, vec3 vec)
@@ -52,9 +54,11 @@ static int relativize_idx(int i, int n)
}
if (i > 0)
+ {
return i - 1;
- if (i < 0)
- return n + i;
+ }
+
+ return n + i;
}
static bool model_validate_idxs(struct model *model)