summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--station_gui.c2
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;