mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
fstk_FindFile checks for sprintf failure
This commit is contained in:
@@ -191,6 +191,11 @@ bool fstk_FindFile(char const *path, char **fullPath, size_t *size)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
len = sprintf(*fullPath, "%s%s", incPath, path);
|
len = sprintf(*fullPath, "%s%s", incPath, path);
|
||||||
|
if (len < 0) {
|
||||||
|
error("sprintf error during include path search: %s\n",
|
||||||
|
strerror(errno));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPathValid(*fullPath)) {
|
if (isPathValid(*fullPath)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user