diff --git a/squirrel/sqcompiler.cpp b/squirrel/sqcompiler.cpp index 9b1c205e..80ada017 100644 --- a/squirrel/sqcompiler.cpp +++ b/squirrel/sqcompiler.cpp @@ -1365,6 +1365,7 @@ class SQCompiler if(_token == _SC('=')) { Lex(); val = ExpectScalar(); + nval = _integer(val)+1; } else { val._type = OT_INTEGER; diff --git a/squirrel/sqlexer.cpp b/squirrel/sqlexer.cpp index 63c8f972..a679922d 100644 --- a/squirrel/sqlexer.cpp +++ b/squirrel/sqlexer.cpp @@ -409,6 +409,13 @@ SQInteger SQLexer::ReadString(SQInteger ndelim,bool verbatim) case _SC('\\'): APPEND_CHAR(_SC('\\')); NEXT(); break; case _SC('"'): APPEND_CHAR(_SC('"')); NEXT(); break; case _SC('\''): APPEND_CHAR(_SC('\'')); NEXT(); break; + case _SC('\n'): + if(ndelim == _SC('"')){ + _currentline++; + NEXT(); + break; + } + //fallthrough default: Error(_SC("unrecognised escaper char")); break;