kernel32: fix incorrect lastpart in GetFullPathNameA with DBCS

Dmitry Timoshkov dmitry at baikal.ru
Thu Oct 9 22:35:00 CDT 2014


Aric Stewart <aric at codeweavers.com> wrote:

> --- a/dlls/kernel32/path.c
> +++ b/dlls/kernel32/path.c
> @@ -271,7 +271,8 @@ DWORD WINAPI GetFullPathNameA( LPCSTR name, DWORD len, LPSTR buffer,
>  
>          if (*p != '\\')
>          {
> -            while ((p > buffer + 2) && (*p != '\\')) p--;
> +            while ((p > buffer + 2) &&
> +                   ((*p != '\\') || IsDBCSLeadByte(*(p-1)))) p--;

This probably should depend on whether ansi or oem code page is active.

-- 
Dmitry.



More information about the wine-devel mailing list