diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:44:31 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:44:31 +0000 |
commit | e75153d8ac12b07f9a47fc08b55a1c6ddb1c4162 (patch) | |
tree | 4c148e9783be47a02ad046d5617f9c00a3bcb235 /src/script/squirrel_helper.hpp | |
parent | fceed4758ccc9d78984297811855f0b59af828da (diff) | |
download | openttd-e75153d8ac12b07f9a47fc08b55a1c6ddb1c4162.tar.xz |
(svn r23597) -Codechange: fix up squirrel export script a bit
Diffstat (limited to 'src/script/squirrel_helper.hpp')
-rw-r--r-- | src/script/squirrel_helper.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index 03f1315fa..cdc4b8b8f 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -109,7 +109,9 @@ namespace SQConvert { template <> inline void *GetParam(ForceType<void *> , HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer tmp; sq_getuserpointer(vm, index, &tmp); return tmp; } template <> inline const char *GetParam(ForceType<const char *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { + /* Convert what-ever there is as parameter to a string */ sq_tostring(vm, index); + const SQChar *tmp; sq_getstring(vm, -1, &tmp); char *tmp_str = strdup(SQ2OTTD(tmp)); |