fix charef parsing

fix bugs like this:
&redirect => ®direct
This commit is contained in:
Кирилл Жумарин 2018-06-16 14:37:28 +03:00 committed by GitHub
parent 7a710b8849
commit 0feee0101d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,14 +140,12 @@ const charef_entry_t * myhtml_charef_find_by_pos(size_t pos, const char *begin,
result->is_done = 1;
if(named_character_references[pos].codepoints_len)
return &named_character_references[pos];
else if(result->last_entry) {
if(result->last_entry) {
*offset = result->last_offset;
return result->last_entry;
}
return &named_character_references[pos];
return &named_character_references[0];
}