Fixed 0 count handling in PSDRV_Text.

This commit is contained in:
Andreas Mohr 2001-04-16 18:55:48 +00:00 committed by Alexandre Julliard
parent a4d215ae3d
commit f493c52209
1 changed files with 3 additions and 0 deletions

View File

@ -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");