(svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD

This commit is contained in:
rubidium
2014-09-06 17:30:33 +00:00
parent 3f9525ff0e
commit 7c4e9dd71d
13 changed files with 53 additions and 68 deletions

View File

@@ -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.");