2
3
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:
Bartek Bok
2012-04-27 21:50:33 +02:00
parent e4458717c9
commit bf6d2a4459

View File

@ -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));