mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 22:08:41 +00:00
os/gfx/win32: fix bad alloc size in new utf16 clipboard path
This commit is contained in:
@@ -1001,7 +1001,7 @@ os_set_clipboard_text(String8 string)
|
|||||||
{
|
{
|
||||||
EmptyClipboard();
|
EmptyClipboard();
|
||||||
String16 string16 = str16_from_8(scratch.arena, string);
|
String16 string16 = str16_from_8(scratch.arena, string);
|
||||||
HANDLE string16_copy_handle = GlobalAlloc(GMEM_MOVEABLE, string16.size*sizeof(string16.str[0])+1);
|
HANDLE string16_copy_handle = GlobalAlloc(GMEM_MOVEABLE, (string16.size+1)*sizeof(string16.str[0]));
|
||||||
if(string16_copy_handle)
|
if(string16_copy_handle)
|
||||||
{
|
{
|
||||||
U16 *copy_buffer = (U16 *)GlobalLock(string16_copy_handle);
|
U16 *copy_buffer = (U16 *)GlobalLock(string16_copy_handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user