mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- let "" be synonymous with 'none' in ZScript.
This commit is contained in:
parent
62a259bb36
commit
30a2171080
2 changed files with 6 additions and 2 deletions
|
@ -192,7 +192,11 @@ struct ExpVal
|
||||||
|
|
||||||
FName GetName() const
|
FName GetName() const
|
||||||
{
|
{
|
||||||
if (Type == TypeString) return FName(*(FString *)&pointer);
|
if (Type == TypeString)
|
||||||
|
{
|
||||||
|
if (((FString *)&pointer)->Len() == 0) return NAME_None;
|
||||||
|
return FName(*(FString *)&pointer);
|
||||||
|
}
|
||||||
return Type == TypeName ? ENamedName(Int) : NAME_None;
|
return Type == TypeName ? ENamedName(Int) : NAME_None;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1686,7 +1686,7 @@ static void DoCast(const VMRegisters ®, const VMFrame *f, int a, int b, int c
|
||||||
|
|
||||||
case CAST_S2N:
|
case CAST_S2N:
|
||||||
ASSERTD(a); ASSERTS(b);
|
ASSERTD(a); ASSERTS(b);
|
||||||
reg.d[a] = FName(reg.s[b]);
|
reg.d[a] = reg.s[b].Len() == 0? FName(NAME_None) : FName(reg.s[b]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CAST_N2S:
|
case CAST_N2S:
|
||||||
|
|
Loading…
Reference in a new issue