X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4676948b6814c97b93c431a8cbcd8c0352c87ba9..1dde66dda68a3d712d2f4de0388c4bb3a3375b36:/src/msw/listbox.cpp diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index c84ead3a3b..247ae933c8 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -454,8 +454,7 @@ wxString wxListBox::GetString(int N) const // +1 for terminating NUL wxString result; - ListBox_GetText(GetHwnd(), N, result.GetWriteBuf(len + 1)); - result.UngetWriteBuf(); + ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1)); return result; }