Add command/string helpers for string separator control character

This commit is contained in:
Jonathan G Rennison
2022-12-03 14:28:50 +00:00
parent 690ef6cc22
commit aaf0385dc5
6 changed files with 25 additions and 2 deletions

View File

@@ -319,7 +319,7 @@ ScriptObject::ActiveInstance::~ActiveInstance()
/* The string must be valid, i.e. not contain special codes. Since some
* can be made with GSText, make sure the control codes are removed. */
text_validated = text;
::StrMakeValidInPlace(text_validated, SVS_NONE);
::StrMakeValidInPlace(text_validated, (GetCommandFlags(cmd) & CMD_STR_SEP) ? SVS_ALLOW_SEPARATOR_CODE : SVS_NONE);
text = text_validated.c_str();
}