Skip to content

Commit adb0781

Browse files
committed
Update rexm.c
1 parent 28c5d16 commit adb0781

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/rexm/rexm.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,9 +2045,14 @@ static char **ScanExampleResources(const char *filePath, int *resPathCount)
20452045
// WARNING: Some paths could be for saving files, not loading, those "resource" files must be omitted
20462046
// HACK: Just check previous position from pointer for function name including the string...
20472047
// This is a quick solution, the good one would be getting the data loading function names...
2048-
//if ((TextFindIndex(ptr - 40, "ExportImage") == -1) &&
2049-
// (TextFindIndex(ptr - 10, "TraceLog") == -1)) // Avoid TraceLog() strings processing
2050-
if (TextFindIndex(ptr - 40, "ExportImage") == -1)
2048+
int functionIndex01 = TextFindIndex(ptr - 40, "ExportImage"); // Check ExportImage()
2049+
int functionIndex02 = TextFindIndex(ptr - 10, "TraceLog"); // Check TraceLog()
2050+
int functionIndex03 = TextFindIndex(ptr - 40, "TakeScreenshot"); // Check TakeScreenshot()
2051+
2052+
2053+
if (!((functionIndex01 != -1) && (functionIndex01 < 40)) && // Not found ExportImage() before ""
2054+
!((functionIndex02 != -1) && (functionIndex02 < 10)) && // Not found TraceLog() before ""
2055+
!((functionIndex03 != -1) && (functionIndex03 < 40))) // Not found TakeScreenshot() before ""
20512056
{
20522057
int len = (int)(end - start);
20532058
if ((len > 0) && (len < REXM_MAX_RESOURCE_PATH_LEN))

0 commit comments

Comments
 (0)