From 4beb4ae2bcb54445598b7a27126c1d231e8469d0 Mon Sep 17 00:00:00 2001 From: pasky Date: Mon, 22 Nov 2004 21:53:19 +0000 Subject: [PATCH] (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(-) diff --git a/station_gui.c b/station_gui.c index 9cbf0a66d2..a43be575e0 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;