Examples performance: Fix wrong always true condition.

This is again obviously wrong. This code tries to check if the type is not
one of three, what it does instead is checking if it's either not the
first two, or is the third, which is always true (because format can't
be too different values at the same time) and always wrong.

CID1327361
This commit is contained in:
Tom Hacohen 2015-12-08 13:10:31 +00:00
parent ca041fc99c
commit 6eb2edfbd9
1 changed files with 1 additions and 1 deletions

View File

@ -575,7 +575,7 @@ _xml_attr_data(void *data, const char *key, const char *value)
format = malloc(sizeof (char) * (strlen(a) - 1));
for (i = 0; i <= (int)strlen(a) - 1; i++)
format[i] = a[i + 1];
if (strcmp(format, "md2") || strcmp(format, "obj") || !strcmp(format, "ply"))
if (strcmp(format, "md2") && strcmp(format, "obj") && strcmp(format, "ply"))
{
fprintf(stdout, "\nUnsupported fromat file\n");
globalGraphical.model_path = NULL;