From d0cead32a64455ec1efd3d37914d948d0b7cbf7a Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Tue, 14 Aug 2007 19:01:07 -0700 Subject: [PATCH] gdiplus: Allow null-terminated strings in GdipDrawString. --- dlls/gdiplus/graphics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 968c89fd65f..f63e073d4c3 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1296,6 +1296,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string return NotImplemented; } + if(length == -1) length = lstrlenW(string); + stringdup = GdipAlloc(length * sizeof(WCHAR)); if(!stringdup) return OutOfMemory;