mirror of
https://github.com/ZDoom/zdbsp.git
synced 2024-11-24 21:01:11 +00:00
Handle escaped " characters when reading strings in SC_GetString()
This commit is contained in:
parent
c9fd7a9062
commit
b1e8738b7c
1 changed files with 11 additions and 0 deletions
11
sc_man.cpp
11
sc_man.cpp
|
@ -286,6 +286,17 @@ bool SC_GetString ()
|
|||
{
|
||||
ScriptPtr++;
|
||||
}
|
||||
else if (*ScriptPtr == '\\')
|
||||
{
|
||||
// Add the backslash character and the following chararcter to the text.
|
||||
// We do not translate the escape sequence in any way, since the only
|
||||
// thing that will happen to this string is that it will be written back
|
||||
// out to disk. Basically, we just need this special case here so that
|
||||
// string reading won't terminate prematurely when a \" sequence is
|
||||
// used to embed a quote mark in the string.
|
||||
*text++ = *ScriptPtr++;
|
||||
*text++ = *ScriptPtr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
*text++ = *ScriptPtr++;
|
||||
|
|
Loading…
Reference in a new issue