# HG changeset patch # User pasky # Date 1101160399 0 # Node ID 53248ab68645bc09d02ecc3e7d30d8806794a695 # Parent e81a0c19c50333dca49fea26b16f9e8ac6bbcd1d (svn r769) Fixed a tiny mistake in the _userstring boundary check. Let's hope I got it right this time. diff -r e81a0c19c503 -r 53248ab68645 station_gui.c --- a/station_gui.c Mon Nov 22 21:48:40 2004 +0000 +++ b/station_gui.c Mon Nov 22 21:53:19 2004 +0000 @@ -375,7 +375,7 @@ 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;