summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2021-02-21 17:03:19 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2021-04-07 09:31:47 +0200
commite0561dbded57f195e7842cf69764e3ee2c3a71da (patch)
tree10ae740118601eb102fa73a753bdcdca03607552 /src/video
parent825867f2c50ce508fac442e6113da9cebbfccf75 (diff)
downloadopenttd-e0561dbded57f195e7842cf69764e3ee2c3a71da.tar.xz
Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers
Diffstat (limited to 'src/video')
-rw-r--r--src/video/win32_v.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 1d9cd3e2b..1b3476dab 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -214,7 +214,7 @@ bool VideoDriver_Win32Base::MakeWindow(bool full_screen, bool resize)
char window_title[64];
seprintf(window_title, lastof(window_title), "OpenTTD %s", _openttd_revision);
- this->main_wnd = CreateWindow(L"OTTD", OTTD2FS(window_title), style, x, y, w, h, 0, 0, GetModuleHandle(nullptr), this);
+ this->main_wnd = CreateWindow(L"OTTD", OTTD2FS(window_title).c_str(), style, x, y, w, h, 0, 0, GetModuleHandle(nullptr), this);
if (this->main_wnd == nullptr) usererror("CreateWindow failed");
ShowWindow(this->main_wnd, showstyle);
}
@@ -331,7 +331,7 @@ static LRESULT HandleIMEComposition(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* Transmit text to windowing system. */
if (len > 0) {
HandleTextInput(nullptr, true); // Clear marked string.
- HandleTextInput(FS2OTTD(str));
+ HandleTextInput(FS2OTTD(str).c_str());
}
SetCompositionPos(hwnd);