Browse Source

Fix possible WinApi misuse

plClipboard
Bartek Bok 13 years ago
parent
commit
e4458717c9
  1. 3
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp

3
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plClipboard/plClipboard.cpp

@ -106,8 +106,7 @@ void plClipboard::SetClipboardText(const wchar_t* text)
wcsncpy(target, text, len + 1); wcsncpy(target, text, len + 1);
::GlobalUnlock(copy); ::GlobalUnlock(copy);
// Place the handle on the clipboard. ::SetClipboardData(CF_UNICODETEXT, copy);
::SetClipboardData(CF_UNICODETEXT, target);
::CloseClipboard(); ::CloseClipboard();
#endif #endif
} }

Loading…
Cancel
Save