1
0
Fork 0
forked from fte/fteqw

Fix a couple of issues when importing obj files.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5810 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-03-13 11:35:34 +00:00
parent d4606452e6
commit 9d2573f708

View file

@ -2590,7 +2590,7 @@ bool parseobj(stream *f)
} }
case 'u': case 'u':
{ {
if(!strncmp(c, "usemtl", 6)) continue; if(strncmp(c, "usemtl", 6)) continue;
while(isalpha(*c)) c++; while(isalpha(*c)) c++;
while(isspace(*c)) c++; while(isspace(*c)) c++;
char *name = c; char *name = c;
@ -5732,7 +5732,7 @@ int main(int argc, char **argv)
break; break;
if(j == countof(outfiles)) if(j == countof(outfiles))
{ {
for (j = countof(outfiles); j --> 0; ) for (j = countof(outfiles)-1; j > 0; j--)
if (type && !strcasecmp(type, outputtypes[j].extname)) if (type && !strcasecmp(type, outputtypes[j].extname))
break; break;
outfiles[j] = argv[i]; //first arg is the output name, if its not an export script thingie. outfiles[j] = argv[i]; //first arg is the output name, if its not an export script thingie.