From 3976cc459d84bb37d7f0addd35c655c41519055b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 29 Jun 2015 12:51:14 +0300 Subject: [PATCH] dwrite: Update current line count when adding metrics for new line. --- dlls/dwrite/layout.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 611a1e6480a..2fe1c41a3d7 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -1033,6 +1033,7 @@ static HRESULT layout_set_line_metrics(struct dwrite_textlayout *layout, DWRITE_ } layout->lines[*line] = *metrics; + layout->line_count += 1; *line += 1; return S_OK; } @@ -1198,8 +1199,6 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout) textpos += layout->clustermetrics[i].length; } - layout->line_count = line; - /* Now all line info is here, update effective runs positions in flow direction */ erun = layout_get_next_erun(layout, NULL); inrun = layout_get_next_inline_run(layout, NULL);