summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-11-27 22:42:24 +0000
committerterkhen <terkhen@openttd.org>2010-11-27 22:42:24 +0000
commitf2cc73bb517b0145455bc216f9729ad4ee878e1e (patch)
tree8b4436f21b7d17fb359a433bc0aeece5cb19ca2e /src
parent9f5a2a112972d797b4af9e8dc0257ab0c72b0b31 (diff)
downloadopenttd-f2cc73bb517b0145455bc216f9729ad4ee878e1e.tar.xz
(svn r21341) -Add: Use the complete industry name instead of only the town when sorting industries by name.
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 4f9aecaec..32ffff33a 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -1128,13 +1128,13 @@ protected:
static char buf_cache[96];
static char buf[96];
- SetDParam(0, (*a)->town->index);
- GetString(buf, STR_TOWN_NAME, lastof(buf));
+ SetDParam(0, (*a)->index);
+ GetString(buf, STR_INDUSTRY_NAME, lastof(buf));
if (*b != last_industry) {
last_industry = *b;
- SetDParam(0, (*b)->town->index);
- GetString(buf_cache, STR_TOWN_NAME, lastof(buf_cache));
+ SetDParam(0, (*b)->index);
+ GetString(buf_cache, STR_INDUSTRY_NAME, lastof(buf_cache));
}
return strcmp(buf, buf_cache);