From 5bb0fb70b84f763e10c76dab56491febec839374 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Mon, 30 Sep 2019 05:23:04 +0000 Subject: [PATCH] fixed a bug in moo_shallowcopy() --- moo/lib/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moo/lib/gc.c b/moo/lib/gc.c index a9c3f35..759602f 100644 --- a/moo/lib/gc.c +++ b/moo/lib/gc.c @@ -1134,7 +1134,7 @@ moo_oop_t moo_shallowcopy (moo_t* moo, moo_oop_t oop) } total_bytes = MOO_SIZEOF(moo_obj_t) + moo_getobjpayloadbytes(moo, oop); - if (MOO_OBJ_GET_FLAGS_HASH(oop)) + if (MOO_OBJ_GET_FLAGS_HASH(oop) == MOO_OBJ_FLAGS_HASH_STORED) { /* exclude the hash value field from copying */ total_bytes -= MOO_SIZEOF(moo_oow_t);