diff options
Diffstat (limited to 'station_gui.c')
-rw-r--r-- | station_gui.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/station_gui.c b/station_gui.c index c0fca5411..9cbf0a66d 100644 --- a/station_gui.c +++ b/station_gui.c @@ -375,6 +375,8 @@ static void DrawStationViewWindow(Window *w) b += 3; for(i=0; i!=NUM_CARGO; i++) { + if (b + 5 > USERSTRING_LEN - 1) + break; if (st->goods[i].waiting_acceptance & 0x8000) { b[0] = 0x81; WRITE_LE_UINT16(b+1, _cargoc.names_s[i]); |