From 98d0166ead16957e84c0f9e3703506f21b15c58c Mon Sep 17 00:00:00 2001 From: "@ran-zhao-yu" Date: Fri, 19 Jul 2024 18:05:06 +0800 Subject: [PATCH] =?UTF-8?q?34459=E6=BC=8F=E6=B4=9E=E4=BF=AE=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @ran-zhao-yu --- xmllint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmllint.c b/xmllint.c index ee6bfdc..2f792f1 100644 --- a/xmllint.c +++ b/xmllint.c @@ -602,7 +602,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { len = strlen(buffer); snprintf(&buffer[len], sizeof(buffer) - len, "\n"); cur = input->cur; - while ((*cur == '\n') || (*cur == '\r')) + while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) cur--; n = 0; while ((cur != base) && (n++ < 80)) { -- Gitee