summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2020-02-01 01:31:23 +0100
committerCharles Pigott <charlespigott@googlemail.com>2020-02-01 10:14:51 +0000
commit196157b29e3b654e2f700b657a4e706d02b26cd6 (patch)
tree1140f9f4f78d41c696dcc8ab541807de62bb77f8 /src
parentbe9ca4689ecfe0f463468bbdbba13dee455949a9 (diff)
downloadopenttd-196157b29e3b654e2f700b657a4e706d02b26cd6.tar.xz
Fix #7966: SQInteger is 64-bit, print it as 64-bit
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp6
-rw-r--r--src/3rdparty/squirrel/squirrel/sqbaselib.cpp2
-rw-r--r--src/3rdparty/squirrel/squirrel/sqdebug.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
index 540975fb5..a4f4e21c3 100644
--- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
+++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
@@ -38,7 +38,7 @@ void sqstd_printcallstack(HSQUIRRELVM v)
src = si.source;
}
}
- pf(v,"*FUNCTION [%s()] %s line [%d]\n",fn,src,si.line);
+ pf(v,"*FUNCTION [%s()] %s line [" OTTD_PRINTF64 "]\n",fn,src,si.line);
level++;
}
level=0;
@@ -56,7 +56,7 @@ void sqstd_printcallstack(HSQUIRRELVM v)
break;
case OT_INTEGER:
sq_getinteger(v,-1,&i);
- pf(v,"[%s] %d\n",name,i);
+ pf(v,"[%s] " OTTD_PRINTF64 "\n",name,i);
break;
case OT_FLOAT:
sq_getfloat(v,-1,&f);
@@ -134,7 +134,7 @@ void _sqstd_compiler_error(HSQUIRRELVM v,const SQChar *sErr,const SQChar *sSourc
{
SQPRINTFUNCTION pf = sq_getprintfunc(v);
if(pf) {
- pf(v,"%s line = (%d) column = (%d) : error %s\n",sSource,line,column,sErr);
+ pf(v,"%s line = (" OTTD_PRINTF64 ") column = (" OTTD_PRINTF64 ") : error %s\n",sSource,line,column,sErr);
}
}
diff --git a/src/3rdparty/squirrel/squirrel/sqbaselib.cpp b/src/3rdparty/squirrel/squirrel/sqbaselib.cpp
index 86a1b1185..e5de01a63 100644
--- a/src/3rdparty/squirrel/squirrel/sqbaselib.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqbaselib.cpp
@@ -219,7 +219,7 @@ static SQInteger base_array(HSQUIRRELVM v)
SQInteger nInitialSize = tointeger(stack_get(v,2));
SQInteger ret = 1;
if (nInitialSize < 0) {
- v->Raise_Error("can't create/resize array with/to size %d", nInitialSize);
+ v->Raise_Error("can't create/resize array with/to size " OTTD_PRINTF64, nInitialSize);
nInitialSize = 0;
ret = -1;
}
diff --git a/src/3rdparty/squirrel/squirrel/sqdebug.cpp b/src/3rdparty/squirrel/squirrel/sqdebug.cpp
index 2f24e83b6..44f767c29 100644
--- a/src/3rdparty/squirrel/squirrel/sqdebug.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqdebug.cpp
@@ -122,5 +122,5 @@ void SQVM::Raise_ParamTypeError(SQInteger nparam,SQInteger typemask,SQInteger ty
StringCat(exptypes,SQString::Create(_ss(this), IdType2Name((SQObjectType)mask), -1), exptypes);
}
}
- Raise_Error("parameter %d has an invalid type '%s' ; expected: '%s'", nparam, IdType2Name((SQObjectType)type), _stringval(exptypes));
+ Raise_Error("parameter " OTTD_PRINTF64 " has an invalid type '%s' ; expected: '%s'", nparam, IdType2Name((SQObjectType)type), _stringval(exptypes));
}