liteserver / binn

Binary Serialization
Apache License 2.0
440 stars 58 forks source link

Creating 2 entries of BLOB types with statically created map invalidates the output #7

Closed mannol closed 7 years ago

mannol commented 7 years ago

If I do the following:

uint8_t out[1000]
binn obj[1];
binn_create(obj, BINN_MAP, 1000, out);
binn_map_set_blob(obj, 1, "data1", 5);
binn_map_set_blob(obj, 2, "data1", 5); // << from this point its impossible to load out[]

EDIT: It works when using binn_map() instead of binn_create()

kroggen commented 7 years ago

The same as #6

mannol commented 7 years ago

Verified and works! Thanks.