mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- fixed the octal parser in strbin. Like its hex counterpart it needs to backtrack one character if it find the end of a sequence.
- since ZScript already receives filtered strings, the 'T' converter for the properties should not do it again.
This commit is contained in:
parent
b206d19df4
commit
dc055b74c1
2 changed files with 7 additions and 4 deletions
|
@ -632,7 +632,10 @@ int strbin (char *str)
|
||||||
if (*p >= '0' && *p <= '7')
|
if (*p >= '0' && *p <= '7')
|
||||||
c += *p-'0';
|
c += *p-'0';
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
p--;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
*str++ = c;
|
*str++ = c;
|
||||||
|
@ -732,7 +735,10 @@ FString strbin1 (const char *start)
|
||||||
if (*p >= '0' && *p <= '7')
|
if (*p >= '0' && *p <= '7')
|
||||||
c += *p-'0';
|
c += *p-'0';
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
p--;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
result << c;
|
result << c;
|
||||||
|
|
|
@ -1676,13 +1676,10 @@ void ZCCCompiler::DispatchProperty(FPropertyInfo *prop, ZCC_PropertyStmt *proper
|
||||||
case 'C': // this parser accepts colors only in string form.
|
case 'C': // this parser accepts colors only in string form.
|
||||||
pref.i = 1;
|
pref.i = 1;
|
||||||
case 'S':
|
case 'S':
|
||||||
|
case 'T': // a filtered string (ZScript only parses filtered strings so there's nothing to do here.)
|
||||||
conv.s = GetString(exp);
|
conv.s = GetString(exp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T': // a filtered string
|
|
||||||
conv.s = strings[strings.Reserve(1)] = strbin1(GetString(exp));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'L': // Either a number or a list of strings
|
case 'L': // Either a number or a list of strings
|
||||||
if (!GetString(exp, true))
|
if (!GetString(exp, true))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue