tttm

git clone https://orangeshoelaces.net/git/tttm.git

0f9b511a16878f85b72fe9fa5755fa126357b35a

Author: Vasily Kolobkov on 06/05/2016

Committer: Vasily Kolobkov on 06/05/2016

Fix literal chunks comparison

Stats

parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/parser.c b/parser.c
index a263d48..b85f007 100644
--- a/parser.c
+++ b/parser.c
@@ -1380,7 +1380,7 @@ p_lit(struct parctx *p, int val)
 			goto exit;
 		wndlag = p->cur.off + match - p->wndoff;
 		chunk = MIN(lit->slen - match, p->wndlee - wndlag);
-		if (strncasecmp(p->wnd + wndlag + match, lit->srep + match,
+		if (strncasecmp(p->wnd + wndlag, lit->srep + match,
 		    chunk) == 0) {
 			match += chunk;
 		} else {