summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index bbe8584f..9ac312aa 100644
--- a/struct.c
+++ b/struct.c
@@ -276,8 +276,10 @@ val make_struct_type(val name, val super,
sethash(struct_type_hash, name, stype);
- if (super)
+ if (super) {
mpush(stype, mkloc(su->dvtypes, super));
+ memcpy(st->stslot, su->stslot, sizeof (val) * su->nstslots);
+ }
call_stinitfun_chain(st, stype);