- 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 committed by drfrag
parent 6fbb1596e7
commit 6f2102ae1d

View file

@ -1361,7 +1361,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;
}