Fix: Theoretical string overflow when building the cargo acceptance list for the land info window.
This commit is contained in:
@@ -313,10 +313,7 @@ public:
|
|||||||
for (CargoID i = 0; i < NUM_CARGO; ++i) {
|
for (CargoID i = 0; i < NUM_CARGO; ++i) {
|
||||||
if (acceptance[i] > 0) {
|
if (acceptance[i] > 0) {
|
||||||
/* Add a comma between each item. */
|
/* Add a comma between each item. */
|
||||||
if (found) {
|
if (found) strp = strecpy(strp, ", ", lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE]));
|
||||||
*strp++ = ',';
|
|
||||||
*strp++ = ' ';
|
|
||||||
}
|
|
||||||
found = true;
|
found = true;
|
||||||
|
|
||||||
/* If the accepted value is less than 8, show it in 1/8:ths */
|
/* If the accepted value is less than 8, show it in 1/8:ths */
|
||||||
|
Reference in New Issue
Block a user