mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:14:10 +00:00
itss: Fix handling non-ASCII content paths.
Signed-off-by: Rafał Mużyło <galtgendo@o2.pl> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aac8d46c21
commit
f4fe2b2dc8
|
@ -935,15 +935,10 @@ static UInt64 _chm_parse_cword(UChar **pEntry)
|
||||||
/* parse a utf-8 string into an ASCII char buffer */
|
/* parse a utf-8 string into an ASCII char buffer */
|
||||||
static BOOL _chm_parse_UTF8(UChar **pEntry, UInt64 count, WCHAR *path)
|
static BOOL _chm_parse_UTF8(UChar **pEntry, UInt64 count, WCHAR *path)
|
||||||
{
|
{
|
||||||
/* MJM - Modified to return real Unicode strings */
|
DWORD length = MultiByteToWideChar(CP_UTF8, 0, (char *)*pEntry, count, path, CHM_MAX_PATHLEN);
|
||||||
while (count != 0)
|
path[length] = '\0';
|
||||||
{
|
*pEntry += count;
|
||||||
*path++ = (*(*pEntry)++);
|
return !!length;
|
||||||
--count;
|
|
||||||
}
|
|
||||||
|
|
||||||
*path = '\0';
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse a PMGL entry into a chmUnitInfo struct; return 1 on success. */
|
/* parse a PMGL entry into a chmUnitInfo struct; return 1 on success. */
|
||||||
|
|
Loading…
Reference in a new issue