Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com --- dlls/dwrite/shape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c index 6428bf6ceb0..d425c189a58 100644 --- a/dlls/dwrite/shape.c +++ b/dlls/dwrite/shape.c @@ -380,7 +380,7 @@ HRESULT shape_get_typographic_features(struct scriptshaping_context *context, co if (t.tags[i] != t.tags[j]) t.tags[++j] = t.tags[i]; } - t.count = j + 1; + t.count = t.count > 0 ? j + 1 : 0;
if (t.count <= max_tagcount) memcpy(tags, t.tags, t.count * sizeof(*t.tags));