forgot to push an index when first inserting a new vertex attrib tuple
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Fri, 1 Mar 2019 21:54:20 +0000 (23:54 +0200)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Fri, 1 Mar 2019 21:54:20 +0000 (23:54 +0200)
src/meshload.c

index ff398aa..a785ac1 100644 (file)
@@ -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;
                                                }