a2 / MessagePack.swift

It's like JSON, but fast and small…and Swift! – msgpack.org[Swift]
http://msgpack.org
MIT License
283 stars 60 forks source link

Fix exception on empty string #37

Closed BrettThePark closed 7 years ago

BrettThePark commented 7 years ago

Currently, when an empty string is contained in the message pack the code will throw an exception. This seems like the wrong behaviour as I believe an empty string is completely valid (0xa0).

This change returns an empty string "" when a count of 0 is found.

a2 commented 7 years ago

Thanks for this! What an oversight on my part 😅