From 452f4efefd5511bc7dbe95b0167b10b403cdcf45 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 26 Jul 2011 06:05:42 +0300 Subject: Fix gsub and getline pass by reference. Add tests. --- builtin.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index 5b75979c..8685d290 100644 --- a/builtin.c +++ b/builtin.c @@ -2412,7 +2412,7 @@ do_match(int nargs) */ NODE * -do_sub(int nargs, unsigned int flags, int *num_matches) +do_sub(int nargs, unsigned int flags) { char *scan; char *bp, *cp; @@ -2680,7 +2680,6 @@ set_how_many: done: DEREF(s); - *num_matches = matches; if ((matches == 0 || (flags & LITERAL) != 0) && buf != NULL) efree(buf); -- cgit v1.2.3