JBenda / inkcpp

Inkle Ink C++ Runtime with JSON>Binary Compiler
MIT License
73 stars 15 forks source link

Fix MSVC Debug Compiler complain #42

Closed JBenda closed 2 years ago

JBenda commented 2 years ago

When deleting tailing Spaces, it may happen, that we look at the termination byte ('\0'). MSVCs implementation of the String Iterator exits the program when that happens with an out-of-bounds error. To avoid this, we check if string remaining before doing the look ahead.

Fixes #41

brwarner commented 2 years ago

Looks great to me!