[PATCH 0/1] MR11298: user32: Fix lastSlash handling in TEXT_PathEllipsify.
Set lastSlash to end of string when no path separator is found. Wine-Bug:https://bugs.winehq.org/show_bug.cgi?id=59727 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11298
From: Maotong Zhang <zmtong1988@gmail.com> Set lastSlash to end of string when no path separator is found. Wine-Bug:https://bugs.winehq.org/show_bug.cgi?id=59727 --- dlls/user32/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/text.c b/dlls/user32/text.c index b757109c9b5..114d0695ac8 100644 --- a/dlls/user32/text.c +++ b/dlls/user32/text.c @@ -247,7 +247,7 @@ static void TEXT_PathEllipsify (HDC hdc, WCHAR *str, unsigned int max_len, lastBkSlash = wcsrchr (str, BACK_SLASH); lastFwdSlash = wcsrchr (str, FORWARD_SLASH); lastSlash = lastBkSlash > lastFwdSlash ? lastBkSlash : lastFwdSlash; - if (!lastSlash) lastSlash = str; + if (!lastSlash) lastSlash = str + *len_str; len_trailing = *len_str - (lastSlash - str); /* overlap-safe movement to the right */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11298
participants (2)
-
Maotong Zhang -
Maotong Zhang (@xiaotong)