[PATCH] gdi32: Handle 0 count in GetCharacterPlacementW.

Sven Baars sbaars at codeweavers.com
Thu Feb 13 10:13:43 CST 2020


Signed-off-by: Sven Baars <sbaars at codeweavers.com>
---
 dlls/gdi32/font.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index d451f30c3e..8788426a2c 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3313,6 +3313,9 @@ GetCharacterPlacementW(
     TRACE("%s, %d, %d, 0x%08x\n",
           debugstr_wn(lpString, uCount), uCount, nMaxExtent, dwFlags);
 
+    if (!uCount)
+        return 0;
+
     if (!lpResults)
         return GetTextExtentPoint32W(hdc, lpString, uCount, &size) ? MAKELONG(size.cx, size.cy) : 0;
 
-- 
2.24.0




More information about the wine-devel mailing list