summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--struct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/struct.c b/struct.c
index c53e68b3da..2076f5709e 100644
--- a/struct.c
+++ b/struct.c
@@ -837,6 +837,7 @@ struct_alloc(VALUE klass)
st->as.heap.ptr = struct_heap_alloc((VALUE)st, n);
rb_mem_clear((VALUE *)st->as.heap.ptr, n);
st->as.heap.len = n;
+ st->as.heap.fields_obj = 0;
return (VALUE)st;
}