From 5336d251a0e6f2d07d9bdfaca2a9b197f7d8c58a Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 1 Mar 2019 23:54:20 +0200 Subject: [PATCH] forgot to push an index when first inserting a new vertex attrib tuple --- src/meshload.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/meshload.c b/src/meshload.c index ff398aa..a785ac1 100644 --- a/src/meshload.c +++ b/src/meshload.c @@ -181,6 +181,11 @@ int cmesh_load(struct cmesh *mesh, const char *fname) } } + if(cmesh_push_index(mesh, newidx) == -1) { + fprintf(stderr, "load_mesh: failed to resize index array\n"); + goto err; + } + if((newfv = malloc(sizeof *newfv))) { *newfv = fv; } -- 1.7.10.4