Commit 6972aa77 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

gdiplus: Fix GdipSetPageUnit parameter validation.

parent 8f7749aa
......@@ -6197,7 +6197,7 @@ GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics *graphics, GpUnit unit)
if(graphics->busy)
return ObjectBusy;
if(unit == UnitWorld)
if(unit == UnitWorld || unit > UnitMillimeter)
return InvalidParameter;
if (is_metafile_graphics(graphics))
......
......@@ -4104,7 +4104,6 @@ static void test_set_page_transform(void)
{
winetest_push_context("%u", i);
status = GdipSetPageUnit(graphics, td_unit[i].unit);
todo_wine_if(td_unit[i].unit > UnitMillimeter)
expect(td_unit[i].isInvalid ? InvalidParameter : Ok, status);
if (status == Ok)
{
......@@ -4131,7 +4130,6 @@ static void test_set_page_transform(void)
status = GdipGetPageUnit(graphics, &unit);
expect(Ok, status);
todo_wine
expect(UnitMillimeter, unit);
status = GdipGetPageScale(graphics, &scale);
expect(Ok, status);
......
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