From: Dmitry Timoshkov dmitry@baikal.ru
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57036 Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/gdiplus/graphics.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index bdb2e1c917c..bc4e759eee3 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5912,7 +5912,11 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * args.rel_width; - if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */ + if (scaled_rect.Width < 0.5) + { + status = Ok; /* doesn't fit */ + goto end; + } }
if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23; @@ -5943,7 +5947,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
SelectObject(hdc, oldfont); DeleteObject(gdifont); - +end: if (temp_hdc) DeleteDC(temp_hdc); else @@ -6091,7 +6095,11 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * rel_width; - if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */ + if (scaled_rect.Width < 0.5) + { + status = Ok; /* doesn't fit */ + goto end; + } }
if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23; @@ -6129,7 +6137,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
DeleteObject(rgn); DeleteObject(gdifont); - +end: RestoreDC(hdc, save_state);
if (temp_hdc)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147710
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00000000007A00E6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * args.rel_width;
if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */
if (scaled_rect.Width < 0.5)
{
status = Ok; /* doesn't fit */
This is a dead assignment (`status` is never checked at the end).
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * rel_width;
if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */
if (scaled_rect.Width < 0.5)
{
status = Ok; /* doesn't fit */
Similar here, `status` is never checked.