user/edit.c: Return 0 length line as 0 length line for EM_GETLINE
[Bug: 2139]
Vitaliy Margolen
wine-patch at kievinfo.com
Mon Oct 17 13:39:45 CDT 2005
Vitaliy Margolen
changelog:
user/edit.c
- Return 0 length line as 0 length line for EM_GETLINE [Bug: 2139]
-------------- next part --------------
Index: dlls/user/edit.c
===================================================================
RCS file: /home/wine/wine/dlls/user/edit.c,v
retrieving revision 1.39
diff -u -p -r1.39 edit.c
--- dlls/user/edit.c 12 Sep 2005 12:20:38 -0000 1.39
+++ dlls/user/edit.c 17 Oct 2005 18:37:14 -0000
@@ -2741,7 +2741,7 @@ static INT EDIT_EM_GetLine(EDITSTATE *es
else
{
INT ret = WideCharToMultiByte(CP_ACP, 0, src, line_len, (LPSTR)dst, dst_len, NULL, NULL);
- if(!ret) /* Insufficient buffer size */
+ if(!ret && line_len) /* Insufficient buffer size */
return dst_len;
if(ret < dst_len) /* Append 0 if enough space */
((LPSTR)dst)[ret] = 0;
More information about the wine-patches
mailing list