changeset 2864:c58daad16c4b draft

(svn r3412) - Fix: When changing game mode, reset the tile highlight data, as it may now be out of bounds. This fixes (at least) an assertion when opening the station builder window.
author peter1138 <peter1138@openttd.org>
date Sat, 21 Jan 2006 19:39:26 +0000
parents 1cbe7937cc07
children 291234616e6b
files openttd.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/openttd.c
+++ b/openttd.c
@@ -814,6 +814,10 @@
 
 	if (_switch_mode_errorstr != INVALID_STRING_ID)
 		ShowErrorMessage(INVALID_STRING_ID,_switch_mode_errorstr,0,0);
+
+	// Reset the TileHighlightData as it may be out of bounds if
+	// the new map is smaller than the old map.
+	memset(&_thd, 0, sizeof(_thd));
 }