Commit 4d26d305 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

wineps: Fix EMRPOLYDRAW16 printing.

It fixes EMRPOLYDRAW16 printing when -O2 option is used (in GCC 12.3.1). The compiler assumes that apts table has 0 or 1 elements and optimizes the loop out. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55486
parent a59336bc
......@@ -2738,8 +2738,8 @@ static int WINAPI hmf_proc(HDC hdc, HANDLETABLE *htable,
if (!pts) return 0;
for (i = 0; i < p->cpts; i++)
{
pts[i].x = p->apts[i].x;
pts[i].y = p->apts[i].y;
pts[i].x = ((const POINTS *)p->apts)[i].x;
pts[i].y = ((const POINTS *)p->apts)[i].y;
}
i = poly_draw(data->ctx, pts, (BYTE *)(p->apts + p->cpts), p->cpts) &&
MoveToEx(data->ctx->hdc, pts[p->cpts - 1].x, pts[p->cpts - 1].y, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment