From b440c9db75e4eec893efa657d094514d35225dfc Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 24 Oct 2021 22:18:29 +0000 Subject: snapshot of project "lynx", label v2-9-0dev_9c --- WWW/Library/Implementation/SGML.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'WWW/Library/Implementation') diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 7e04a6cc..d120644b 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1,5 +1,5 @@ /* - * $LynxId: SGML.c,v 1.177 2021/07/23 20:36:47 tom Exp $ + * $LynxId: SGML.c,v 1.182 2021/10/24 22:18:29 tom Exp $ * * General SGML Parser code SGML.c * ======================== @@ -2467,9 +2467,17 @@ static void SGML_character(HTStream *me, int c_in) */ testlast = string->size - 2 - me->trailing_spaces - me->leading_spaces; +#ifdef USE_COLOR_STYLE +#define TagSize(p) ((p)->name_len) +#else +#define TagSize(p) (strlen((p)->name)) +#endif + if (TOUPPER(c) != ((testlast < 0) ? '/' - : testtag->name[testlast])) { + : ((testlast < (int) TagSize(testtag)) + ? testtag->name[testlast] + : 0))) { int i; /* -- cgit 1.4.1-2-gfad0