1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-03 18:08:14 +01:00

(svn r25102) [1.3] -Backport from trunk:

- Fix: Limit aircraft property 0D to 19, since the conversion result to km-ish/h needs to fit into a byte [FS#5492] (r25099)
- Fix: Clicking the statusbar crashed, when news were pending but no news were shown yet [FS#5486] (r25093)
- Fix: Make editbox character filters also apply to pasted content from clipboard (r25090, r25089)
- Fix: Catch exception anonymously, if the exception content is not of interest [FS#5500] (r25081)
This commit is contained in:
rubidium
2013-03-17 20:58:40 +00:00
parent 278cebf202
commit 42e569e0d1
14 changed files with 26 additions and 21 deletions

View File

@@ -909,8 +909,14 @@ void ShowLastNewsMessage()
} else if (_forced_news == NULL) {
/* Not forced any news yet, show the current one, unless a news window is
* open (which can only be the current one), then show the previous item */
const Window *w = FindWindowById(WC_NEWS_WINDOW, 0);
ni = (w == NULL || (_current_news == _oldest_news)) ? _current_news : _current_news->prev;
if (_current_news == NULL) {
/* No news were shown yet resp. the last shown one was already deleted.
* Threat this as if _forced_news reached _oldest_news; so, wrap around and start anew with the latest. */
ni = _latest_news;
} else {
const Window *w = FindWindowById(WC_NEWS_WINDOW, 0);
ni = (w == NULL || (_current_news == _oldest_news)) ? _current_news : _current_news->prev;
}
} else if (_forced_news == _oldest_news) {
/* We have reached the oldest news, start anew with the latest */
ni = _latest_news;