mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
- fixed: The struct field compiler did not check for forward declared type references that hadn't been resolved yet.
This commit is contained in:
parent
485c4c71b5
commit
948e50e458
2 changed files with 6 additions and 0 deletions
|
@ -2247,6 +2247,7 @@ bool PStruct::ReadValue(FSerializer &ar, const char *key, void *addr) const
|
|||
|
||||
PField *PStruct::AddField(FName name, PType *type, uint32_t flags)
|
||||
{
|
||||
assert(type->Size > 0);
|
||||
return Symbols.AddField(name, type, flags, Size, &Align);
|
||||
}
|
||||
|
||||
|
|
|
@ -1298,6 +1298,11 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArray<ZCC_VarDeclarator *
|
|||
auto name = field->Names;
|
||||
do
|
||||
{
|
||||
if (fieldtype->Size == 0 && !(varflags & VARF_Native)) // Size not known yet.
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (AddTreeNode(name->Name, name, TreeNodes, !forstruct))
|
||||
{
|
||||
auto thisfieldtype = fieldtype;
|
||||
|
|
Loading…
Reference in a new issue