aboutsummaryrefslogtreecommitdiffstats
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-11-22 20:30:09 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-11-22 20:30:09 +0200
commit52715ba9f8510f30368462fee1b1d24bf282b0aa (patch)
tree2b7569bb73d64433f84ccf2672c3973809804b51 /field.c
parentf7ae9cfb843379b95d8cb44dbb8de7bbf11862de (diff)
parent033faa34a743231a88a6c555503397045726666f (diff)
downloadegawk-52715ba9f8510f30368462fee1b1d24bf282b0aa.tar.gz
egawk-52715ba9f8510f30368462fee1b1d24bf282b0aa.tar.bz2
egawk-52715ba9f8510f30368462fee1b1d24bf282b0aa.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'field.c')
-rw-r--r--field.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/field.c b/field.c
index 2e5cc1d5..0799fb1b 100644
--- a/field.c
+++ b/field.c
@@ -952,6 +952,9 @@ do_split(int nargs)
return make_number((AWKNUM) 0);
}
+ if ((sep->flags & REGEX) != 0)
+ sep = sep->typed_re;
+
if ( (sep->re_flags & FS_DFLT) != 0
&& current_field_sep() == Using_FS
&& ! RS_is_null) {
@@ -1014,6 +1017,9 @@ do_patsplit(int nargs)
src = TOP_STRING();
+ if ((sep->flags & REGEX) != 0)
+ sep = sep->typed_re;
+
fpat = sep->re_exp;
if (fpat->stlen == 0)
fatal(_("patsplit: third argument must be non-null"));