jangko / msgpack4nim

MessagePack serializer/deserializer implementation for Nim / msgpack.org[Nim]
http://msgpack.org/
119 stars 21 forks source link

fix unpack null #51

Closed kit494way closed 4 years ago

kit494way commented 4 years ago

Before this change, unpacking not null value after null is incorrect.

Situation

Unpack [ null, "str" ] and deserialize to value of

type
  CustomType = object
    strref: ref string
    str: string

Expected result

CustomType(str: "str")

Current result

CustomType(str: "")