summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-22 21:37:28 +0000
committerdarkvater <darkvater@openttd.org>2004-12-22 21:37:28 +0000
commitedabf3efa1131d31b60826bc89cf474ddb4b1674 (patch)
tree915f2d9452c690d52429d7b093fda1870814ecbf
parenta92dc63ec90343fbe1b403719882a7f8876f67ba (diff)
downloadopenttd-edabf3efa1131d31b60826bc89cf474ddb4b1674.tar.xz
(svn r1237) -Fix: Viewports crash when too many viewports are open. Their amount was not updated to reflect the updated windows amount (thx lefti)
-rw-r--r--viewport.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/viewport.h b/viewport.h
index b21a4aa64..826e8c6c0 100644
--- a/viewport.h
+++ b/viewport.h
@@ -99,7 +99,8 @@ typedef struct TileHighlightData {
bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc);
/* viewport.c */
-VARDEF ViewPort _viewports[18];
+// XXX - maximum viewports is maximum windows - 2 (main toolbar + status bar)
+VARDEF ViewPort _viewports[25 - 2];
VARDEF TileHighlightData _thd;
VARDEF uint32 _active_viewports;