neuecc / Utf8Json

Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
MIT License
2.35k stars 266 forks source link

Fixed bug in binary search: replaced signed with unsigned comparison. #188

Open svpetry opened 4 years ago

svpetry commented 4 years ago

I found a bug in the code generation for the binary search in AutomataDictionary. A signed comparison is emitted where an unsigned one is needed. This can lead to strange situations where random fields are not deserialized dependent on their naming.