From 9c943ceec031a8b18e74c26c9d610a6dfb14a7f1 Mon Sep 17 00:00:00 2001 From: ketmar Date: Wed, 2 Oct 2013 14:37:19 +0300 Subject: [PATCH] Match: fixed 'full match' (was gibberish) --- src/builtins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/builtins.c b/src/builtins.c index d53a559..786430f 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -335,6 +335,7 @@ static LIST *builtin_match (PARSE *parse, LOL *args, int *jmp) { /* add full match as last item */ { int l = mt[0].ep-mt[0].sp; + dstr_clear(&buf); if (l > 0) dstr_push_buf(&buf, mt[0].sp, l); else dstr_push_cstr(&buf, "1"); res = list_new(res, dstr_cstr(&buf), 0); } -- 2.11.4.GIT