From b91e85003eb56e626e0b3713ef6711d77ee2906b Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 3 Jun 2018 15:47:15 +0200 Subject: [PATCH] Fix: Theoretical string overflow when building the cargo acceptance list for the land info window. --- src/misc_gui.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 01e8d2c45d..5252832b55 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -313,10 +313,7 @@ public: for (CargoID i = 0; i < NUM_CARGO; ++i) { if (acceptance[i] > 0) { /* Add a comma between each item. */ - if (found) { - *strp++ = ','; - *strp++ = ' '; - } + if (found) strp = strecpy(strp, ", ", lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE])); found = true; /* If the accepted value is less than 8, show it in 1/8:ths */