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;