(svn r769) Fixed a tiny mistake in the _userstring boundary check. Let's hope I got it right this time.

This commit is contained in:
pasky 2004-11-22 21:53:19 +00:00
parent bf587e9aac
commit 4beb4ae2bc
1 changed files with 1 additions and 1 deletions

View File

@ -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;