mirror of
https://github.com/sfall-team/int2ssl.git
synced 2026-07-27 16:52:42 -07:00
Replace linebreaks with escape sequence when storing string constants.
This commit is contained in:
@@ -100,7 +100,7 @@ void CFalloutScript::StoreDefinitions()
|
||||
switch(m_GlobalVar[i].GetOperator())
|
||||
{
|
||||
case COpcode::O_STRINGOP:
|
||||
strDefinition = format(strDefinition + " := \"%s\"", m_Stringspace[ulVarValue].c_str());
|
||||
strDefinition = format(strDefinition + " := \"%s\"", escape_str(m_Stringspace[ulVarValue]).c_str());
|
||||
break;
|
||||
|
||||
case COpcode::O_FLOATOP:
|
||||
@@ -245,7 +245,7 @@ void CFalloutScript::StoreDefinitions()
|
||||
switch(defObject.m_ulAttributes & 0xFFFF)
|
||||
{
|
||||
case COpcode::O_STRINGOP:
|
||||
strDefinition = format(strDefinition + " := \"%s\"", m_Stringspace[defObject.m_ulVarValue].c_str());
|
||||
strDefinition = format(strDefinition + " := \"%s\"", escape_str(m_Stringspace[defObject.m_ulVarValue]).c_str());
|
||||
break;
|
||||
|
||||
case COpcode::O_FLOATOP:
|
||||
@@ -535,7 +535,8 @@ std::string CFalloutScript::GetSource(CNode& node, bool bLabel, uint32_t ulNumAr
|
||||
else
|
||||
{
|
||||
strResult = "\"";
|
||||
strResult += m_Stringspace[ulArgument] + "\"";
|
||||
strResult += escape_str(m_Stringspace[ulArgument]);
|
||||
strResult += "\"";
|
||||
}
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
|
||||
Reference in New Issue
Block a user