REXM: REVIEWED: ScanExampleResources() avoid resources to be saved by the program

This commit is contained in:
Ray
2025-08-17 21:31:05 +02:00
parent 6da0a180e6
commit 24d1d64417

View File

@ -1802,6 +1802,11 @@ static char **ScanExampleResources(const char *filePath, int *resPathCount)
char *end = strchr(start, '"'); char *end = strchr(start, '"');
if (!end) break; 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); int len = (int)(end - start);
if ((len > 0) && (len < REXM_MAX_RESOURCE_PATH_LEN)) if ((len > 0) && (len < REXM_MAX_RESOURCE_PATH_LEN))
{ {
@ -1836,6 +1841,7 @@ static char **ScanExampleResources(const char *filePath, int *resPathCount)
} }
} }
} }
}
ptr = end + 1; ptr = end + 1;
} }