user: Fix LB_GETTEXT mapping for A<->W. [Bug 3592]
Vitaliy Margolen
wine-patch at kievinfo.com
Sat Dec 17 23:39:40 CST 2005
ChangeLog:
user: Fix LB_GETTEXT mapping for A<->W. [Bug 3592]
dlls/user/winproc.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
-------------- next part --------------
bbf3c75ff5e97036c5ca830f5de4b5b6414f6bdc
diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c
index ff5ceaf..bd7ec61 100644
--- a/dlls/user/winproc.c
+++ b/dlls/user/winproc.c
@@ -956,8 +956,9 @@ LRESULT WINPROC_UnmapMsg32ATo32W( HWND h
if ( WINPROC_TestLBForStr( hwnd ))
{
LPARAM *ptr = (LPARAM *)lParam - 1;
- result = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1,
- (LPSTR)*ptr, 0x7fffffff, NULL, NULL ) - 1;
+ if (result != LB_ERR)
+ result = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1,
+ (LPSTR)*ptr, 0x7fffffff, NULL, NULL ) - 1;
HeapFree( GetProcessHeap(), 0, ptr );
}
break;
@@ -1224,7 +1225,8 @@ static LRESULT WINPROC_UnmapMsg32WTo32A(
if ( WINPROC_TestLBForStr( hwnd ))
{
LPARAM *ptr = (LPARAM *)lParam - 1;
- result = MultiByteToWideChar( CP_ACP, 0, (LPSTR)lParam, -1, (LPWSTR)*ptr, 0x7fffffff ) - 1;
+ if (result != LB_ERR)
+ result = MultiByteToWideChar( CP_ACP, 0, (LPSTR)lParam, -1, (LPWSTR)*ptr, 0x7fffffff ) - 1;
HeapFree( GetProcessHeap(), 0, ptr );
}
break;
More information about the wine-patches
mailing list