xmllite: Fix reader_cmp for multiple characters.

This commit is contained in:
Vincent Povirk 2015-02-20 12:54:32 -06:00 committed by Alexandre Julliard
parent 49815a60f9
commit 8615365945
1 changed files with 13 additions and 1 deletions

View File

@ -900,8 +900,20 @@ static inline WCHAR *reader_get_ptr(xmlreader *reader)
static int reader_cmp(xmlreader *reader, const WCHAR *str)
{
int i=0;
const WCHAR *ptr = reader_get_ptr(reader);
return strncmpW(str, ptr, strlenW(str));
while (str[i])
{
if (!ptr[i])
{
reader_more(reader);
ptr = reader_get_ptr(reader);
}
if (str[i] != ptr[i])
return ptr[i] - str[i];
i++;
}
return 0;
}
/* moves cursor n WCHARs forward */