Browse Source

Always copy terminating NULL when pasting

plClipboard
Bartek Bok 13 years ago
parent
commit
bf6d2a4459
  1. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp

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

Loading…
Cancel
Save