summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-10-06 18:11:41 +0200
committerMichael Lutz <michi@icosahedron.de>2019-10-06 18:24:30 +0200
commitdd11990ce0d3c523717c50e7a88177f5d92baa41 (patch)
tree475e44836e8aafb2bc53e52213eec1871bb26fe5 /src
parent4154cf00f451a4cf05b5184e6eeb677e0d002c89 (diff)
downloadopenttd-dd11990ce0d3c523717c50e7a88177f5d92baa41.tar.xz
Fix 71a3e8346: strings need to be copied too.
If it's not, iterating on it in a loop is quite pointless.
Diffstat (limited to 'src')
-rw-r--r--src/error_gui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/error_gui.cpp b/src/error_gui.cpp
index fb986edda..807bd48e1 100644
--- a/src/error_gui.cpp
+++ b/src/error_gui.cpp
@@ -78,6 +78,7 @@ ErrorMessageData::ErrorMessageData(const ErrorMessageData &data) :
{
memcpy(this->textref_stack, data.textref_stack, sizeof(this->textref_stack));
memcpy(this->decode_params, data.decode_params, sizeof(this->decode_params));
+ memcpy(this->strings, data.strings, sizeof(this->strings));
for (size_t i = 0; i < lengthof(this->strings); i++) {
if (this->strings[i] != nullptr) {
this->strings[i] = stredup(this->strings[i]);