From: John Tsiombikas Date: Wed, 8 Sep 2021 05:17:41 +0000 (+0300) Subject: updated treestore.h X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=95e4bd8e387c3cb9fc325ae922052bf7bc7ae8ea;hp=5c66bff3dc3b2fdf8b57908de4ebcfc6da6e3597;p=vrlugburz updated treestore.h fixed uninitialized variable in load_mtllib --- diff --git a/libs/treestore/treestore.h b/libs/treestore/treestore.h index 6a3278a..842a489 100644 --- a/libs/treestore/treestore.h +++ b/libs/treestore/treestore.h @@ -113,6 +113,8 @@ void ts_free_node(struct ts_node *n); /**< also calls ts_destroy_node */ /** recursively destroy all the nodes of the tree */ void ts_free_tree(struct ts_node *tree); +int ts_set_node_name(struct ts_node *node, const char *name); + void ts_add_attr(struct ts_node *node, struct ts_attr *attr); struct ts_attr *ts_get_attr(struct ts_node *node, const char *name); diff --git a/src/scenefile.c b/src/scenefile.c index 398ce96..dda0499 100644 --- a/src/scenefile.c +++ b/src/scenefile.c @@ -320,7 +320,7 @@ static int load_mtllib(struct scenefile *scn, const char *path_prefix, const cha FILE *fp; char buf[256], *line; struct objmtl om; - struct material *mtl; + struct material *mtl = 0; if(path_prefix && *path_prefix) { sprintf(buf, "%s/%s", path_prefix, mtlfname);