--- a/src/openttd.cpp Wed Jun 13 14:56:27 2007 +0000
+++ b/src/openttd.cpp Wed Jun 13 14:57:42 2007 +0000
@@ -475,6 +475,11 @@
if (startyear != INVALID_YEAR) _patches_newgame.starting_year = startyear;
if (generation_seed != GENERATE_NEW_SEED) _patches_newgame.generation_seed = generation_seed;
+ /* The width and height must be at least 1 pixel, this
+ * way all internal drawing routines work correctly. */
+ if (_cur_resolution[0] == 0) _cur_resolution[0] = 1;
+ if (_cur_resolution[1] == 0) _cur_resolution[1] = 1;
+
#if defined(ENABLE_NETWORK)
if (dedicated_host) snprintf(_network_server_bind_ip_host, NETWORK_HOSTNAME_LENGTH, "%s", dedicated_host);
if (dedicated_port) _network_server_port = dedicated_port;