src/strings.cpp
changeset 6359 8527262c4cf8
parent 6357 f0f5e7d1713c
child 6420 456c275f3313
--- a/src/strings.cpp	Thu Mar 22 04:10:05 2007 +0000
+++ b/src/strings.cpp	Thu Mar 22 23:19:40 2007 +0000
@@ -585,9 +585,15 @@
 					}
 
 					default:
-						buff = FormatCommaNumber(buff, GetInt32(&argv), last);
-						buff = strecpy(buff, " ", last);
-						buff = strecpy(buff, GetStringPtr(cargo_str), last);
+						if (cargo_str >= 0xE000 && cargo_str < 0xF800) {
+							/* NewGRF strings from Action 4 use a different format here,
+							 * of e.g. "x tonnes of coal", so process accordingly. */
+							buff = GetStringWithArgs(buff, cargo_str, argv++, last);
+						} else {
+							buff = FormatCommaNumber(buff, GetInt32(&argv), last);
+							buff = strecpy(buff, " ", last);
+							buff = strecpy(buff, GetStringPtr(cargo_str), last);
+						}
 						break;
 				}
 			} break;