1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix #14315: Crash when renaming APVC in Korean

This commit is contained in:
Gymnasiast
2021-03-15 20:43:10 +01:00
parent 706fdae588
commit 645685de18
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
------------------------------------------------------------------------
- Feature: [#14071] “Vandals stopped” statistic for security guards.
- Fix: [#13894] Block brakes do not animate.
- Fix: [#14315] Crash when trying to rename Air Powered Vertical Coaster in Korean.
0.3.3 (2021-03-13)
------------------------------------------------------------------------

View File

@@ -105,7 +105,10 @@ public:
void SetText(std::string_view text, size_t maxLength)
{
_buffer = text;
char* tmp = new char[maxLength];
safe_strcpy(tmp, std::string(text).c_str(), maxLength);
_buffer = tmp;
delete[] tmp;
_buffer.resize(maxLength);
_maxInputLength = maxLength;
gTextInput = context_start_text_input(_buffer.data(), maxLength);