instant-labs / instant-xml

11 stars 3 forks source link

Check character boundaries before comparing string slices #35

Closed djc closed 1 year ago

djc commented 1 year ago

@valkum good point! I decided to invest a little, and rewrote the decode() implementation with an explicit state machine that is a little shorter, quite a bit faster and more likely to be correct -- comes with benchmarks and tests.