nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.31k stars 7.69k forks source link

stb_c_lexer: Bug fix: parsing a character literal consumes extra input character #1442

Open hsnyder opened 1 year ago

hsnyder commented 1 year ago

When lexing a character literal, the character immediately after the closing quote would be skipped over. This fixes that issue.

Reproducing example: put the following in a file, and try lexing it. You won't get the ')' token.

'-')