From 6c1b9d6858efd57fcb8489c0a97d8d9af42d7166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 18 Dec 2019 05:29:03 +0000 Subject: [PATCH] Really fix serialization of NULL values. [INTERPRETER] * BUG: Really fix serialization of NULL values. --- main/gbx/gbx_stream.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/gbx/gbx_stream.c b/main/gbx/gbx_stream.c index b35cefe42..c7fbbe268 100644 --- a/main/gbx/gbx_stream.c +++ b/main/gbx/gbx_stream.c @@ -1421,15 +1421,19 @@ void STREAM_write_type(STREAM *stream, TYPE type, VALUE *value) case T_OBJECT: { - CLASS *class = OBJECT_class(value->_object.object); + CLASS *class; void *structure; if (!value->_object.object) { buffer._byte = 0; STREAM_write(stream, &buffer._byte, 1); + break; } - else if (class->quick_array == CQA_ARRAY || class->is_array_of_struct) + + class = OBJECT_class(value->_object.object) + + if (class->quick_array == CQA_ARRAY || class->is_array_of_struct) { CARRAY *array = (CARRAY *)value->_object.object; VALUE temp;