- fixed: version wasn't set for ZScript global variables

https://forum.zdoom.org/viewtopic.php?t=64830
This commit is contained in:
alexey.lysiuk 2019-05-29 17:34:57 +03:00
parent d336a83355
commit 38291dfacc

View file

@ -1353,7 +1353,7 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArray<ZCC_VarDeclarator *
// This is a global variable.
if (fd->BitValue != 0) thisfieldtype = fd->FieldSize == 1 ? TypeUInt8 : fd->FieldSize == 2 ? TypeUInt16 : TypeUInt32;
PField *f = Create<PField>(name->Name, thisfieldtype, varflags | VARF_Native | VARF_Static, fd->FieldOffset, fd->BitValue);
if (f->Flags & (ZCC_Version | ZCC_Deprecated))
if (field->Flags & (ZCC_Version | ZCC_Deprecated))
{
f->mVersion = field->Version;
}