Browse Source

Add "\t" as a special case to output it as "\t" instead of "\x9"

mingodad 11 years ago
parent
commit
bf7857cf79
1 changed files with 4 additions and 0 deletions
  1. 4 0
      SquiLu/sqstdlib/sqstdstring.cpp

+ 4 - 0
SquiLu/sqstdlib/sqstdstring.cpp

@@ -139,6 +139,10 @@ SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen
                             *ts2++ = _SC('\\');
                             *ts2++ = _SC('n');
                         }
+                        else if (*ts == _SC('\t')) {
+                            *ts2++ = _SC('\\');
+                            *ts2++ = _SC('t');
+                        }
                         else if (*ts == _SC('\0') || iscntrl(uchar(*ts))) {
                           SQChar buff[10];
                           int iw;