diff options
author | pasky <pasky@openttd.org> | 2004-11-22 21:53:19 +0000 |
---|---|---|
committer | pasky <pasky@openttd.org> | 2004-11-22 21:53:19 +0000 |
commit | 4beb4ae2bcb54445598b7a27126c1d231e8469d0 (patch) | |
tree | af103ae7150da6f6f4d04f3e69b3929239c1c08f /station_gui.c | |
parent | bf587e9aacd8c552770b6cf68635455c089b2d7d (diff) | |
download | openttd-4beb4ae2bcb54445598b7a27126c1d231e8469d0.tar.xz |
(svn r769) Fixed a tiny mistake in the _userstring boundary check. Let's hope I got it right this time.
Diffstat (limited to 'station_gui.c')
-rw-r--r-- | station_gui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/station_gui.c b/station_gui.c index 9cbf0a66d..a43be575e 100644 --- a/station_gui.c +++ b/station_gui.c @@ -375,7 +375,7 @@ static void DrawStationViewWindow(Window *w) b += 3; for(i=0; i!=NUM_CARGO; i++) { - if (b + 5 > USERSTRING_LEN - 1) + if ((b - (byte *) &_userstring) + 5 > USERSTRING_LEN - 1) break; if (st->goods[i].waiting_acceptance & 0x8000) { b[0] = 0x81; |