summaryrefslogtreecommitdiff
path: root/src/news_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-08 22:53:49 +0000
committerrubidium <rubidium@openttd.org>2008-05-08 22:53:49 +0000
commit2ba05f898759269ba72b2ffd73aed7268e0ff56e (patch)
treeb20a6a2b3525e06f4c44ed37151eedb5444c74d4 /src/news_gui.cpp
parentbc514a7f51647e4428658294c8fbde908855fa8b (diff)
downloadopenttd-2ba05f898759269ba72b2ffd73aed7268e0ff56e.tar.xz
(svn r13021) -Codechange: free data_b for other uses when it is not used to store a second tile to skip to (in news messages). Patch by cirdan.
Diffstat (limited to 'src/news_gui.cpp')
-rw-r--r--src/news_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 2b1bacb6a..cd0482539 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -209,11 +209,11 @@ static void NewsWindowProc(Window *w, WindowEvent *e)
} else if (ni->flags & NF_TILE) {
if (_ctrl_pressed) {
ShowExtraViewPortWindow(ni->data_a);
- if (ni->data_b != 0) {
+ if (ni->flags & NF_TILE2) {
ShowExtraViewPortWindow(ni->data_b);
}
} else {
- if (!ScrollMainWindowToTile(ni->data_a) && ni->data_b != 0) {
+ if (!ScrollMainWindowToTile(ni->data_a) && ni->flags & NF_TILE2) {
ScrollMainWindowToTile(ni->data_b);
}
}