From 4beb4ae2bcb54445598b7a27126c1d231e8469d0 Mon Sep 17 00:00:00 2001 From: pasky Date: Mon, 22 Nov 2004 21:53:19 +0000 Subject: (svn r769) Fixed a tiny mistake in the _userstring boundary check. Let's hope I got it right this time. --- station_gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'station_gui.c') 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; -- cgit v1.2.3-70-g09d2