summaryrefslogtreecommitdiff
path: root/station_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-03-25 14:19:33 +0000
committertron <tron@openttd.org>2005-03-25 14:19:33 +0000
commit9832a691fe1db29d9564c4fbea0c057faa1e030c (patch)
treea7a6df81cc0c220bd888291e50a656b598e33b4b /station_gui.c
parent6d75cce924fb6c46be7a0cae11cf1485451d494f (diff)
downloadopenttd-9832a691fe1db29d9564c4fbea0c057faa1e030c.tar.xz
(svn r2060) Clean up some string construction and remove now unused macro
Diffstat (limited to 'station_gui.c')
-rw-r--r--station_gui.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/station_gui.c b/station_gui.c
index b98afe617..c28861cdc 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -398,18 +398,16 @@ static void DrawStationViewWindow(Window *w)
} while (pos > -5 && ++i != 12);
if (IsWindowOfPrototype(w, _station_view_widgets)) {
- char *b;
+ char *b = _userstring;
- b = _userstring;
b = InlineString(b, STR_000C_ACCEPTS);
- for(i=0; i!=NUM_CARGO; i++) {
- if ((b - _userstring) + 5 > USERSTRING_LEN - 1)
- break;
+ for (i = 0; i != NUM_CARGO; i++) {
+ if (b >= endof(_userstring) - 5 - 1) break;
if (st->goods[i].waiting_acceptance & 0x8000) {
b = InlineString(b, _cargoc.names_s[i]);
- WRITE_LE_UINT16(b, 0x202C);
- b += 2;
+ *b++ = ',';
+ *b++ = ' ';
}
}
@@ -417,7 +415,7 @@ static void DrawStationViewWindow(Window *w)
b = InlineString(b, STR_00D0_NOTHING);
*b++ = '\0';
} else {
- b[-2] = 0;
+ b[-2] = '\0';
}
DrawStringMultiLine(2, 67, STR_SPEC_USERSTRING, 245);