- let "" be synonymous with 'none' in ZScript.

This commit is contained in:
Christoph Oelckers 2016-11-12 10:06:26 +01:00
commit 30a2171080
2 changed files with 6 additions and 2 deletions

View file

@ -192,7 +192,11 @@ struct ExpVal
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;
}
};