mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Always copy terminating NULL when pasting
This commit is contained in:
@ -517,7 +517,7 @@ hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
|
||||
if (len > 0)
|
||||
{
|
||||
wchar_t* insertTarget = fBuffer + fCursorPos;
|
||||
size_t bufferTailLen = wcslen(insertTarget);
|
||||
size_t bufferTailLen = wcslen(insertTarget) + 1; //include terminating \0
|
||||
if (fCursorPos + len + bufferTailLen < fBufferSize)
|
||||
{
|
||||
memmove(insertTarget + len, insertTarget, bufferTailLen * sizeof(wchar_t));
|
||||
|
Reference in New Issue
Block a user