fixed a bug in moo_shallowcopy()

This commit is contained in:
hyunghwan.chung 2019-09-30 05:23:04 +00:00
parent 3559e5fa0e
commit 5bb0fb70b8

View File

@ -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);