Fix an incorrect (harmless) memory allocation

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 22 09:56:45 CDT 2001


Hello.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Fix an incorrect (harmless) memory allocation.

--- cvs/wine/dlls/x11drv/window.c	Tue Jul 31 23:25:52 2001
+++ wine/dlls/x11drv/window.c	Wed Aug 22 14:50:16 2001
@@ -742,7 +742,7 @@
 
         /* allocate new buffer for window text */
         count = WideCharToMultiByte(text_cp, 0, text, -1, NULL, 0, NULL, NULL);
-        if (!(buffer = HeapAlloc( GetProcessHeap(), 0, count * sizeof(WCHAR) )))
+        if (!(buffer = HeapAlloc( GetProcessHeap(), 0, count )))
         {
             ERR("Not enough memory for window text\n");
             WIN_ReleaseWndPtr( wndPtr );






More information about the wine-patches mailing list