summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/assemble.c b/assemble.c
index 24037d9..8d7eb85 100644
--- a/assemble.c
+++ b/assemble.c
@@ -192,9 +192,11 @@ uint16_t handle_struct(line **ln, uint64_t address, uint16_t offset, uint8_t dbg
if (member && t->type != DIR_UNION && t->type != DIR_STRUCT) {
member->val = offset;
}
- size += member_size;
if (is_struct) {
+ size += member_size;
offset += member_size;
+ } else if (size < member_size) {
+ size = member_size;
}
}
ismember = 0;
@@ -666,7 +668,7 @@ static void print_symtree(symbol *s, int depth) {
}
}
-static void fix_symtree(line *l) {
+void fix_symtree(line *l) {
symbol *s = symbols;
symbol *cur_sym = NULL;
symbol *sym_struct = NULL;