From df21566f9ff733db55b379a4b2b4d419524702a0 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Thu, 5 May 2005 15:22:20 +0000 Subject: [PATCH] (svn r2268) - Fix [ 1195595 ] high resolutions don't work. Clamp all possible inputs of resolutions to the maximum availble --- ttd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ttd.c b/ttd.c index 825f52ea60..6d7ce950a5 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)