diff options
author | Michael Lutz <michi@icosahedron.de> | 2019-10-06 18:11:41 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-10-06 18:24:30 +0200 |
commit | dd11990ce0d3c523717c50e7a88177f5d92baa41 (patch) | |
tree | 475e44836e8aafb2bc53e52213eec1871bb26fe5 | |
parent | 4154cf00f451a4cf05b5184e6eeb677e0d002c89 (diff) | |
download | openttd-dd11990ce0d3c523717c50e7a88177f5d92baa41.tar.xz |
Fix 71a3e8346: strings need to be copied too.
If it's not, iterating on it in a loop is quite pointless.
-rw-r--r-- | src/error_gui.cpp | 1 |
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]); |