1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-03 03:56:32 -04:00

Prevent useless tests when @namelen is 0.

This commit is contained in:
Laurent MONIN 2005-12-08 16:11:19 +01:00 committed by Laurent MONIN
parent 8aa078393a
commit 5f66f98b66

View File

@ -517,12 +517,16 @@ skip_table(unsigned char *html, unsigned char *eof)
html++;
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);