aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--obj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/obj.c b/obj.c
index ef3f0fb..37df37a 100644
--- a/obj.c
+++ b/obj.c
@@ -281,11 +281,11 @@ objmtlparse(char *file)
int nf;
if((p = strrchr(curline.file, '/')) != nil)
- snprint(buf, sizeof buf, "%.*s/%s", p-curline.file, curline.file, file);
+ snprint(buf, sizeof buf, "%.*s/%s", (int)(p-curline.file), curline.file, file);
bin = Bopen(buf, OREAD);
if(bin == nil)
- sysfatal("Bopen: %r");
+ return nil;
ml = allocmtl(file);
m = nil;
@@ -728,7 +728,7 @@ Line2:
*p = 0;
if((obj->materials = objmtlparse(buf)) == nil){
error("objmtlparse: %r");
- goto error;
+ fprint(2, "%r");
}
}else if(strcmp(buf, "usemtl") == 0){
while(isspace(c))