cn-cbor
cn-cbor copied to clipboard
Bug fixed in cn-cbor library
When encoding cn_cbor structure before writing any chunk of bytes into buffer, library ensures that there is enough space to write current chunk. It is done by the following inequality: offset+length >= size. If inequality is true, then library decides that there is no enough space. However, if offset+length == size then there is still enough space to write a chunk of size length.
This same change is also in #25 and the same problem also fixed by #49.