From 3254a6b2d632050564d7a568963b6f110d68be63 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 27 Jan 2016 15:57:47 +0300 Subject: [PATCH] dwrite: Fix invalid cluster metrics array index access. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/dwrite/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 03001666118..77426e9ba8d 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -3264,7 +3264,7 @@ static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *ifa /* Ignore trailing whitespace clusters, in case of single space range will be reduced to empty range, or [start,start+1). */ - while ((end - 1) >= start && This->clustermetrics[end-1].isWhitespace) + while (end > start && This->clustermetrics[end-1].isWhitespace) end--; /* check if cluster range exceeds last minimal width */