Fixed inexact value for last argument of two fl_utf8toUtf16() calls.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
554a50b33b
commit
4900292262
@ -559,7 +559,7 @@ void Fl::copy(const char *stuff, int len, int clipboard) {
|
||||
EmptyClipboard();
|
||||
HGLOBAL hMem = GlobalAlloc(GHND, utf16_len * 2 + 2); // moveable and zero'ed mem alloc.
|
||||
LPVOID memLock = GlobalLock(hMem);
|
||||
fl_utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], (unsigned short*) memLock, utf16_len * 2);
|
||||
fl_utf8toUtf16(fl_selection_buffer[clipboard], fl_selection_length[clipboard], (unsigned short*) memLock, utf16_len + 1);
|
||||
GlobalUnlock(hMem);
|
||||
SetClipboardData(CF_UNICODETEXT, hMem);
|
||||
CloseClipboard();
|
||||
|
@ -425,8 +425,7 @@ public:
|
||||
int utf16_len = fl_utf8toUtf16(fl_selection_buffer[0], fl_selection_length[0], 0, 0);
|
||||
HGLOBAL gh = GlobalAlloc( GHND, utf16_len * 2 + 2 );
|
||||
char *pMem = (char*)GlobalLock( gh );
|
||||
fl_utf8toUtf16(fl_selection_buffer[0], fl_selection_length[0], (unsigned short*)pMem, utf16_len * 2);
|
||||
pMem[ 2*utf16_len ] = 0;
|
||||
fl_utf8toUtf16(fl_selection_buffer[0], fl_selection_length[0], (unsigned short*)pMem, utf16_len + 1);
|
||||
// HGLOBAL gh = GlobalAlloc( GHND| GMEM_SHARE,
|
||||
// (fl_selection_length[0]+4) * sizeof(short)
|
||||
// + sizeof(DROPFILES));
|
||||
|
Loading…
x
Reference in New Issue
Block a user