summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-05-05 15:22:20 +0000
committerDarkvater <darkvater@openttd.org>2005-05-05 15:22:20 +0000
commitdf21566f9ff733db55b379a4b2b4d419524702a0 (patch)
tree22dd6d0e727d7cd8a9cf90f4dc800865c10ef905 /ttd.c
parentc85f049f521ca1c7f94fdbccae6657ab2af5451c (diff)
downloadopenttd-df21566f9ff733db55b379a4b2b4d419524702a0.tar.xz
(svn r2268) - Fix [ 1195595 ] high resolutions don't work. Clamp all possible inputs of resolutions to the maximum availble
Diffstat (limited to 'ttd.c')
-rw-r--r--ttd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ttd.c b/ttd.c
index 825f52ea6..6d7ce950a 100644
--- a/ttd.c
+++ b/ttd.c
@@ -421,8 +421,8 @@ static void ParseResolution(int res[2], char *s)
return;
}
- res[0] = strtoul(s, NULL, 0);
- res[1] = strtoul(t + 1, NULL, 0);
+ res[0] = clamp(strtoul(s, NULL, 0), 64, MAX_SCREEN_WIDTH);
+ res[1] = clamp(strtoul(t + 1, NULL, 0), 64, MAX_SCREEN_HEIGHT);
}
static void InitializeDynamicVariables(void)