[Win32utils-devel] Fwd: win32-clipboard and Unicode zero bytes

Berger, Daniel Daniel.Berger at qwest.com
Thu Feb 2 11:29:07 EST 2006


> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Park Heesob
> Sent: Thursday, February 02, 2006 5:07 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Fwd: win32-clipboard and 
> Unicode zero bytes

<snip>

> Here is some patches of clipboard.c
> 
> Line 70:
>    hMem = GlobalAlloc(GHND, strlen(data) + sizeof(TCHAR*));
> to
>    hMem = GlobalAlloc(GHND, RSTRING(rbData)->len + sizeof(TCHAR*));
> 
> Line 75:
>    strcpy((TCHAR *)GlobalLock(hMem), data);
> to
>    memcpy((TCHAR *)GlobalLock(hMem), data, RSTRING(rbData)->len);
> 
> HTH,
> 
> Park Heesob

Works great, thanks!  Please commit.

Dan



More information about the win32utils-devel mailing list