I finally managed to fix it! For some reason Emscripten didn't like converting the score's char[] to a C++ string and back to do concatenation...