From 6725dc61ebbb1e4ec5adddedc6d3fae8a7a555ea Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 3 May 2000 17:43:42 +0000 Subject: [PATCH] Fixed DrawTextW length handling. --- objects/text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/objects/text.c b/objects/text.c index aa07e1846ec..3d0de8d420e 100644 --- a/objects/text.c +++ b/objects/text.c @@ -327,6 +327,7 @@ INT WINAPI DrawTextW( HDC hdc, LPCWSTR str, INT count, acount = WideCharToMultiByte(codepage,0,str,count,NULL,0,NULL,NULL); p = HeapAlloc( GetProcessHeap(), 0, acount ); acount = WideCharToMultiByte(codepage,0,str,count,p,acount,NULL,NULL); + if (count == -1) acount = -1; ret = DrawTextA( hdc, p, acount, rect, flags ); HeapFree( GetProcessHeap(), 0, p ); -- 2.11.4.GIT