summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-07-28 17:02:41 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-08-02 20:19:07 +0100
commit8cccb158e98a4a5c93d85fe2e09d3937855c4675 (patch)
treee0df7d73ce874bf8ef60aea40438b3ff1e7c0519 /src/strings.cpp
parent425cd3e4ca8cf6812bdf015c649a7bf4b76a71a1 (diff)
downloadopenttd-8cccb158e98a4a5c93d85fe2e09d3937855c4675.tar.xz
Fix #7672: more than 32 resolutions may be available
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 5d186e717..5593f6ba0 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1673,7 +1673,7 @@ static char *GetSpecialNameString(char *buff, int ind, StringParameters *args, c
}
/* resolution size? */
- if (IsInsideMM(ind, (SPECSTR_RESOLUTION_START - 0x70E4), (SPECSTR_RESOLUTION_END - 0x70E4) + 1)) {
+ if (IsInsideBS(ind, (SPECSTR_RESOLUTION_START - 0x70E4), _resolutions.size())) {
int i = ind - (SPECSTR_RESOLUTION_START - 0x70E4);
buff += seprintf(
buff, last, "%ux%u", _resolutions[i].width, _resolutions[i].height