mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-25 00:41:15 +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)
|
PField *PStruct::AddField(FName name, PType *type, uint32_t flags)
|
||||||
{
|
{
|
||||||
|
assert(type->Size > 0);
|
||||||
return Symbols.AddField(name, type, flags, Size, &Align);
|
return Symbols.AddField(name, type, flags, Size, &Align);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1298,6 +1298,11 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArray<ZCC_VarDeclarator *
|
||||||
auto name = field->Names;
|
auto name = field->Names;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
if (fieldtype->Size == 0 && !(varflags & VARF_Native)) // Size not known yet.
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (AddTreeNode(name->Name, name, TreeNodes, !forstruct))
|
if (AddTreeNode(name->Name, name, TreeNodes, !forstruct))
|
||||||
{
|
{
|
||||||
auto thisfieldtype = fieldtype;
|
auto thisfieldtype = fieldtype;
|
||||||
|
|
Loading…
Reference in a new issue