Changeset - r24078:62643cef8f82
[Not reviewed]
master
0 3 0
glx - 5 years ago 2020-02-01 00:31:23
glx@openttd.org
Fix #7966: SQInteger is 64-bit, print it as 64-bit
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp
Show inline comments
 
@@ -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
 
{
 
	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);
 
	}
 
}
 

	
src/3rdparty/squirrel/squirrel/sqbaselib.cpp
Show inline comments
 
@@ -219,7 +219,7 @@ static SQInteger base_array(HSQUIRRELVM 
 
	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;
 
	}
src/3rdparty/squirrel/squirrel/sqdebug.cpp
Show inline comments
 
@@ -122,5 +122,5 @@ void SQVM::Raise_ParamTypeError(SQIntege
 
			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));
 
}
0 comments (0 inline, 0 general)