Browse Source

Fix off by one pointer mishandling

mingodad 8 years ago
parent
commit
ff1247f4a5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      SquiLu/squirrel/sqbaselib.cpp

+ 1 - 1
SquiLu/squirrel/sqbaselib.cpp

@@ -2220,7 +2220,7 @@ static SQRESULT string_iso88959_to_utf8 (HSQUIRRELVM v) {
             *c++ = (0x80 | (*s & 0x3f));
             *c++ = (0x80 | (*s & 0x3f));
         }
         }
     }
     }
-    *c++ = '\0';
+    *c = '\0';
     sq_pushstring(v, buf, c - (SQUChar*)buf);
     sq_pushstring(v, buf, c - (SQUChar*)buf);
     return 1;
     return 1;
 }
 }