Codechange: only one '\0' is required

This commit is contained in:
Rubidium 2023-06-08 17:34:28 +02:00 committed by rubidium42
parent 2ae7367024
commit 9408ab4799
1 changed files with 1 additions and 2 deletions

View File

@ -915,9 +915,8 @@ static void SlStdString(void *ptr, VarType conv)
return;
}
str->resize(len + 1);
str->resize(len);
SlCopyBytes(str->data(), len);
(*str)[len] = '\0'; // properly terminate the string
StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK;
if ((conv & SLF_ALLOW_CONTROL) != 0) {