xmllite: Fix reader_cmp for multiple characters.
This commit is contained in:
parent
49815a60f9
commit
8615365945
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue