Fixed DrawTextW length handling.
diff --git a/objects/text.c b/objects/text.c index aa07e18..3d0de8d 100644 --- a/objects/text.c +++ b/objects/text.c
@@ -327,6 +327,7 @@ 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 );