summaryrefslogtreecommitdiff
path: root/src/script/script_info.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-09-08 09:55:04 +0000
committerrubidium <rubidium@openttd.org>2011-09-08 09:55:04 +0000
commit62777dbd84f380b701e7be8b6aac86af9a511de4 (patch)
tree698bb9ce6358115bbd58f5796f47e21daa19d87a /src/script/script_info.cpp
parent414c397000935162df4641dbe0c056b39d32205e (diff)
downloadopenttd-62777dbd84f380b701e7be8b6aac86af9a511de4.tar.xz
(svn r22905) -Fix [FS#4753] (r22836): the name of the tar was removed from the AI filenames, so record it differently. Also removes some of the hackery to get the tar's filename
Diffstat (limited to 'src/script/script_info.cpp')
-rw-r--r--src/script/script_info.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/script_info.cpp b/src/script/script_info.cpp
index 152bb02f3..dc21e26f2 100644
--- a/src/script/script_info.cpp
+++ b/src/script/script_info.cpp
@@ -31,6 +31,7 @@ ScriptFileInfo::~ScriptFileInfo()
free((void *)this->instance_name);
free((void *)this->url);
free(this->main_script);
+ free(this->tar_file);
free(this->SQ_instance);
}
@@ -69,6 +70,8 @@ bool ScriptFileInfo::CheckMethod(const char *name) const
}
info->main_script = strdup(scanner->GetMainScript());
+ const char *tar_name = scanner->GetTarFile();
+ if (tar_name != NULL) info->tar_file = strdup(tar_name);
/* Cache the data the info file gives us. */
if (!info->engine->CallStringMethodStrdup(*info->SQ_instance, "GetAuthor", &info->author, MAX_GET_OPS)) return SQ_ERROR;