From f493c52209b246f87ae8187ea8d8f31a216873de Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Mon, 16 Apr 2001 18:55:48 +0000 Subject: [PATCH] Fixed 0 count handling in PSDRV_Text. --- dlls/wineps/text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wineps/text.c b/dlls/wineps/text.c index c2365601da4..596360c78cd 100644 --- a/dlls/wineps/text.c +++ b/dlls/wineps/text.c @@ -81,6 +81,9 @@ static BOOL PSDRV_Text(DC *dc, INT x, INT y, LPCWSTR str, UINT count, LPWSTR strbuf; SIZE sz; + if (!count) + return TRUE; + strbuf = HeapAlloc( PSDRV_Heap, 0, (count + 1) * sizeof(WCHAR)); if(!strbuf) { WARN("HeapAlloc failed\n"); -- 2.11.4.GIT