diff --git a/GUI/host/host.h b/GUI/host/host.h index c1b4c15..2aebd7e 100644 --- a/GUI/host/host.h +++ b/GUI/host/host.h @@ -32,7 +32,7 @@ namespace Host inline std::wstring ToWString(const char* text, UINT encoding) { std::wstring ret(strlen(text), 0); - ret.resize(MultiByteToWideChar(encoding, 0, text, -1, ret.data(), ret.size())); + ret.resize(MultiByteToWideChar(encoding, 0, text, -1, ret.data(), ret.capacity())); return ret; }