Browse Source

Fix mistake that removed a size decrement

mingodad 11 years ago
parent
commit
6fb3161690
1 changed files with 1 additions and 1 deletions
  1. 1 1
      SquiLu/sqstdlib/sqstdstring.cpp

+ 1 - 1
SquiLu/sqstdlib/sqstdstring.cpp

@@ -129,7 +129,7 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
                       *ts2++ = _SC('"');
                       while (size--) {
                         if (*ts == _SC('\r') && *(ts+1) == _SC('\n') ) {
-                          ++ts;//eat \r and output only \n
+                          ++ts; --size;//eat \r and output only \n
                         }
                         if (*ts == _SC('"') || *ts == _SC('\\')) {
                             *ts2++ = _SC('\\');