JBenda / inkcpp

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

Fix/addition stack smash #20

Closed JBenda closed 3 years ago

JBenda commented 3 years ago

Fix for #18, it was an error in add. Because it was first access _data[j] and then checked if j was in bound, the compiler felled smart and just execute the for loop, because when you don't check the index it would be right.

JBenda commented 3 years ago

Error happen for:gcc (GCC) 10.2.0 with -O2 -g -DNDEBUG and -O3 -DNDEBUG