ignorecase: Don't crash if enumeration returned a NULL pointer.
This commit is contained in:
parent
d08188c1e0
commit
be0afe31e3
|
@ -50,18 +50,22 @@ static int locateOneElement(char *buf)
|
||||||
ptr++; /* point past dirsep to entry itself. */
|
ptr++; /* point past dirsep to entry itself. */
|
||||||
} /* else */
|
} /* else */
|
||||||
|
|
||||||
for (i = rc; *i != NULL; i++)
|
if (rc != NULL)
|
||||||
{
|
{
|
||||||
if (PHYSFS_utf8stricmp(*i, ptr) == 0)
|
for (i = rc; *i != NULL; i++)
|
||||||
{
|
{
|
||||||
strcpy(ptr, *i); /* found a match. Overwrite with this case. */
|
if (PHYSFS_utf8stricmp(*i, ptr) == 0)
|
||||||
PHYSFS_freeList(rc);
|
{
|
||||||
return 1;
|
strcpy(ptr, *i); /* found a match. Overwrite with this case. */
|
||||||
} /* if */
|
PHYSFS_freeList(rc);
|
||||||
} /* for */
|
return 1;
|
||||||
|
} /* if */
|
||||||
|
} /* for */
|
||||||
|
|
||||||
|
PHYSFS_freeList(rc);
|
||||||
|
} /* if */
|
||||||
|
|
||||||
/* no match at all... */
|
/* no match at all... */
|
||||||
PHYSFS_freeList(rc);
|
|
||||||
return 0;
|
return 0;
|
||||||
} /* locateOneElement */
|
} /* locateOneElement */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue