summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpasky <pasky@openttd.org>2005-03-26 04:02:50 +0000
committerpasky <pasky@openttd.org>2005-03-26 04:02:50 +0000
commitd4b3469e2f828043deab48b47d32691c3f2f283f (patch)
treebf8d449aaf1e7e41b119615b5f8368ca90cdba0d
parent7340aa5b8e5ee1e639890201906b1352705f078b (diff)
downloadopenttd-d4b3469e2f828043deab48b47d32691c3f2f283f.tar.xz
(svn r2073) - Fix: Fixed an apparent oversight in AddTextMessage() which is likely to have caused some messages not expiring from the chatterbox after the given time, as reported by dp-.
-rw-r--r--texteff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/texteff.c b/texteff.c
index 73789bd06..1a34263cf 100644
--- a/texteff.c
+++ b/texteff.c
@@ -83,7 +83,7 @@ void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...
memmove(&_text_message_list[0], &_text_message_list[1], sizeof(TextMessage) * (MAX_CHAT_MESSAGES - 1));
snprintf(_text_message_list[MAX_CHAT_MESSAGES - 1].message, MAX_TEXTMESSAGE_LENGTH, "%s", buf2);
_text_message_list[MAX_CHAT_MESSAGES - 1].color = color;
- _text_message_list[i].end_date = _date + duration;
+ _text_message_list[MAX_CHAT_MESSAGES - 1].end_date = _date + duration;
_textmessage_dirty = true;
}