Fix for vectors in unions/structs.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@634 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-12 18:43:57 +00:00
parent d7de645deb
commit 577d0cea5e
1 changed files with 3 additions and 1 deletions

View File

@ -6801,6 +6801,8 @@ QCC_def_t *QCC_PR_DummyFieldDef(QCC_type_t *type, char *name, QCC_def_t *scope,
sprintf(newname, "%s%s", parttype->name, array);
ftype = QCC_PR_NewType("FIELD TYPE", ev_field);
ftype->aux_type = parttype;
if (parttype->type == ev_vector)
ftype->size = parttype->size; //vector fields create a _y and _z too, so we need this still.
def = QCC_PR_GetDef(NULL, newname, scope, false, 1);
if (!def)
{
@ -6841,7 +6843,7 @@ QCC_def_t *QCC_PR_DummyFieldDef(QCC_type_t *type, char *name, QCC_def_t *scope,
}
}
*fieldofs = maxfield;
*fieldofs = maxfield; //final size of the union.
return first;
}