diff options
author | rubidium <rubidium@openttd.org> | 2014-09-06 19:54:35 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-06 19:54:35 +0000 |
commit | eb52e65beccd66e8ebdb1d8897b609c331b21bcc (patch) | |
tree | 4391ac105c468b52c56a98143c030a26f954658f /src/3rdparty/squirrel/sqstdlib | |
parent | 962c1a3242e213a65078ed4217112978ddb0c613 (diff) | |
download | openttd-eb52e65beccd66e8ebdb1d8897b609c331b21bcc.tar.xz |
(svn r26777) -Codechange: use safe string functions in squirrel code as well, and prevent using the ones that are deemed unsafe
Diffstat (limited to 'src/3rdparty/squirrel/sqstdlib')
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp | 5 | ||||
-rw-r--r-- | src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp index c4002bf2c..fcd3c33be 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp @@ -1,9 +1,14 @@ /* see copyright notice in squirrel.h */ + +#include "../../../stdafx.h" + #include <squirrel.h> #include <sqstdaux.h> #include <assert.h> #include <string.h> +#include "../../../safeguards.h" + void sqstd_printcallstack(HSQUIRRELVM v) { SQPRINTFUNCTION pf = sq_getprintfunc(v); diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp index 0f5d65194..e1c9da266 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdmath.cpp @@ -1,9 +1,14 @@ /* see copyright notice in squirrel.h */ + +#include "../../../stdafx.h" + #include <squirrel.h> #include <math.h> #include <stdlib.h> #include <sqstdmath.h> +#include "../../../safeguards.h" + #define SINGLE_ARG_FUNC(_funcname, num_ops) static SQInteger math_##_funcname(HSQUIRRELVM v){ \ SQFloat f; \ sq_decreaseops(v,num_ops); \ |