From 618425ac4c405aaa28aa30d787e119ae6c605996 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 4 Jan 2012 14:57:52 +0100 Subject: [PATCH] gdi32: Fix skipping of zero-length dashes. --- dlls/gdi32/dibdrv/objects.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index dffea122c15..ee581926d58 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -779,7 +779,7 @@ void reset_dash_origin(dibdrv_physdev *pdev) static inline void skip_dash(dibdrv_physdev *pdev, unsigned int skip) { skip %= pdev->pen_pattern.total_len; - while(skip) + do { if(pdev->dash_pos.left_in_dash > skip) { @@ -792,6 +792,7 @@ static inline void skip_dash(dibdrv_physdev *pdev, unsigned int skip) pdev->dash_pos.left_in_dash = pdev->pen_pattern.dashes[pdev->dash_pos.cur_dash]; pdev->dash_pos.mark = !pdev->dash_pos.mark; } + while (skip); } static void dashed_pen_line_callback(dibdrv_physdev *pdev, INT x, INT y)