1
0
Fork 0

Escape logged strings returned from expression functions

This commit is contained in:
Duncan Ogilvie 2023-11-07 13:11:36 +01:00
parent dfda450b41
commit 735d3ca5f9
1 changed files with 7 additions and 2 deletions

View File

@ -123,8 +123,13 @@ static String printValue(FormatValueType value, StringValueType type)
if(!parser.Calculate(evalue, valuesignedcalc(), false))
return "???";
if(type == StringValueType::Default && evalue.isString)
return evalue.data;
if(evalue.isString)
{
if(type == StringValueType::Default)
return StringUtils::Escape(evalue.data);
else if(type == StringValueType::String)
return evalue.data; // allow raw string output
}
duint valuint = 0;
if(evalue.isString || !evalue.DoEvaluate(valuint))