[apps/code] Use textLength in VarBoxController::insertTextInCaller

This commit is contained in:
Léa Saviot
2020-03-25 16:21:59 +01:00
committed by Émilie Feral
parent eeb42f2544
commit 0f02a61dc4
2 changed files with 6 additions and 4 deletions

View File

@@ -62,6 +62,7 @@ void TextToInsertForCommandText(const char * command, int commandLength, char *
index += UTF8Decoder::CodePointToChars(codePoint, buffer + index, bufferSize - index);
} else {
if (replaceArgsWithEmptyChar && !argumentAlreadyReplaced) {
assert(index < bufferSize);
index += UTF8Decoder::CodePointToChars(UCodePointEmpty, buffer + index, bufferSize - index);
argumentAlreadyReplaced = true;
}