diff options
author | rubidium <rubidium@openttd.org> | 2014-09-06 17:30:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-06 17:30:33 +0000 |
commit | 7c4e9dd71d6f02f686c52551ccdcc27b89ef8025 (patch) | |
tree | 7556a992183a12029525bf9ed3f6be8ced9d9dc8 /src/script/api/script_admin.cpp | |
parent | 3f9525ff0ecb5a12ca8635b88691154c293c4d8f (diff) | |
download | openttd-7c4e9dd71d6f02f686c52551ccdcc27b89ef8025.tar.xz |
(svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD
Diffstat (limited to 'src/script/api/script_admin.cpp')
-rw-r--r-- | src/script/api/script_admin.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/script/api/script_admin.cpp b/src/script/api/script_admin.cpp index feecd11db..f6c41387b 100644 --- a/src/script/api/script_admin.cpp +++ b/src/script/api/script_admin.cpp @@ -37,12 +37,9 @@ } case OT_STRING: { - const SQChar *res; - sq_getstring(vm, index, &res); + const SQChar *buf; + sq_getstring(vm, index, &buf); - /* @bug if a string longer than 512 characters is given to SQ2OTTD, the - * internal buffer overflows. */ - const char *buf = SQ2OTTD(res); size_t len = strlen(buf) + 1; if (len >= 255) { ScriptLog::Error("Maximum string length is 254 chars. No data sent."); |