squix78 / json-streaming-parser

Arduino library for parsing potentially huge json streams on devices with scarce memory
MIT License
205 stars 88 forks source link

Fix for resetting stackPos #31

Open bigbug opened 3 years ago

bigbug commented 3 years ago

In the reset method the stack-Position was not reset. This leads to an overflow of the stack array when the parser is reused and (the previous document was not fully finished or the previous document was faulty).

The introduced fix resets the stackPos to 0 in the reset() method.