Fix TextReplace warning for const (#3687)

This commit is contained in:
ubkp 2023-12-28 19:13:47 -03:00 committed by GitHub
parent 3fc43c1096
commit 5b5a2d035d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1534,7 +1534,7 @@ char *TextReplace(const char *text, const char *replace, const char *by)
byLen = TextLength(by); byLen = TextLength(by);
// Count the number of replacements needed // Count the number of replacements needed
insertPoint = text; insertPoint = (char*)text;
for (count = 0; (temp = strstr(insertPoint, replace)); count++) insertPoint = temp + replaceLen; for (count = 0; (temp = strstr(insertPoint, replace)); count++) insertPoint = temp + replaceLen;
// Allocate returning string and point temp to it // Allocate returning string and point temp to it