Fixed wide character comparison.
authorArmin Novak <armin.novak@thincast.com>
Fri, 8 Feb 2019 08:20:58 +0000 (09:20 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 8 Feb 2019 08:20:58 +0000 (09:20 +0100)
winpr/libwinpr/path/path.c

index accb5e6..1cd9518 100644 (file)
@@ -726,7 +726,7 @@ HRESULT PathCchStripPrefixW(PWSTR pszPath, size_t cchPath)
                if (cchPath < (lstrlenW(&pszPath[4]) + 1))
                        return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
 
-               if (IsCharAlphaW(pszPath[4]) && (pszPath[5] == ':')) /* like C: */
+               if (IsCharAlphaW(pszPath[4]) && (pszPath[5] == L':')) /* like C: */
                {
                        wmemmove_s(pszPath, cchPath, &pszPath[4], cchPath - 4);
                        /* since the passed pszPath must not necessarily be null terminated