mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Prevent useless tests when @namelen is 0.
This commit is contained in:
parent
8aa078393a
commit
5f66f98b66
@ -518,11 +518,15 @@ skip_table(unsigned char *html, unsigned char *eof)
|
||||
|
||||
if (html >= eof) return eof;
|
||||
|
||||
if (!namelen) continue;
|
||||
|
||||
if (*name == '/') {
|
||||
closing_tag = 1;
|
||||
name++; namelen--;
|
||||
if (!namelen) continue;
|
||||
}
|
||||
|
||||
|
||||
if (!strlcasecmp(name, namelen, "TABLE", 5)) {
|
||||
if (!closing_tag) {
|
||||
level++;
|
||||
@ -592,15 +596,17 @@ see:
|
||||
goto se;
|
||||
}
|
||||
|
||||
if (!namelen) goto se;
|
||||
|
||||
if (name[0] == '/') {
|
||||
name++; namelen--;
|
||||
if (!namelen) goto se;
|
||||
closing_tag = 1;
|
||||
|
||||
} else {
|
||||
closing_tag = 0;
|
||||
}
|
||||
|
||||
|
||||
if (!strlcasecmp(name, namelen, "TABLE", 5)) {
|
||||
if (!closing_tag) {
|
||||
en = skip_table(en, eof);
|
||||
|
Loading…
Reference in New Issue
Block a user