Increment the index when emitting array elements.

Oops :)
This commit is contained in:
Bill Currie 2011-02-04 08:25:27 +09:00
parent d7853682af
commit e04ed72afa

View file

@ -264,7 +264,7 @@ emit_structure (const char *name, int su, struct_def_t *defs, type_t *type,
} else {
if (is_array (field_def.type)) {
for (j = 0; j < field_def.type->t.array.size; j++) {
defs[i].emit (&field_def, data, 0);
defs[i].emit (&field_def, data, j);
field_def.offset+=type_size (field_def.type->t.array.type);
}
} else {