[ion/utf8_helper] Fix bad variable use

This commit is contained in:
Léa Saviot
2020-11-05 11:57:21 +01:00
committed by EmilieNumworks
parent 7acec88006
commit f96e4e92ce

View File

@@ -203,7 +203,7 @@ void TryAndReplacePatternsInStringByPatterns(char * text, int textMaxLength, Tex
size_t replacingStringLength = strlen(replacingString);
if (strncmp(&text[i], matchedString, matchedStringLength) == 0) {
didReplace = replaceFirstCharsByPattern(&text[i], matchedStringLength, replacingString, textMaxLength);
didReplace = replaceFirstCharsByPattern(&text[i], matchedStringLength, replacingString, textMaxLength - i);
if (didReplace) {
int delta = replacingStringLength - matchedStringLength;
textLength += delta;