mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-08 07:09:18 -05:00
REXM: REVIEWED: ScanExampleResources() avoid resources to be saved by the program
This commit is contained in:
@ -1802,6 +1802,11 @@ static char **ScanExampleResources(const char *filePath, int *resPathCount)
|
||||
char *end = strchr(start, '"');
|
||||
if (!end) break;
|
||||
|
||||
// TODO: WARNING: Some paths could be for files to save, not files to load, verify it
|
||||
// HACK: Just check previous position from pointer for function name including the string...
|
||||
// This is a horrible solution, the good one would be getting the data loading function names...
|
||||
if (TextFindIndex(ptr - 40, "ExportImage") == -1)
|
||||
{
|
||||
int len = (int)(end - start);
|
||||
if ((len > 0) && (len < REXM_MAX_RESOURCE_PATH_LEN))
|
||||
{
|
||||
@ -1836,6 +1841,7 @@ static char **ScanExampleResources(const char *filePath, int *resPathCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ptr = end + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user