mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Use AddField() to add user variables in DECORATE
This commit is contained in:
parent
806d9d7a95
commit
da496bbe62
1 changed files with 2 additions and 3 deletions
|
@ -584,9 +584,8 @@ static void ParseUserVariable (FScanner &sc, PSymbolTable *symt, PClassActor *cl
|
|||
}
|
||||
sc.MustGetToken(';');
|
||||
|
||||
PField *sym = new PField(symname, type, 0);
|
||||
sym->Offset = cls->Extend(type);
|
||||
if (symt->AddSymbol(sym) == NULL)
|
||||
PField *sym = cls->AddField(symname, type, 0);
|
||||
if (cls == NULL)
|
||||
{
|
||||
sc.ScriptMessage ("'%s' is already defined in '%s'.",
|
||||
symname.GetChars(), cls ? cls->TypeName.GetChars() : "Global");
|
||||
|
|
Loading…
Reference in a new issue