summaryrefslogtreecommitdiff
path: root/field.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-06-05 21:46:13 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-06-05 21:46:13 +0300
commitf2435761c0550c8d1adf887b1f216c32e49af772 (patch)
treeef5f65f0385bf079d5a3228f9dd61c98ca2a5e0f /field.c
parent9c36f7bcdea295134a1800c68a9e90fd8ca821f2 (diff)
downloadgawk-f2435761c0550c8d1adf887b1f216c32e49af772.tar.gz
Bug fix to FPAT and update test.
Diffstat (limited to 'field.c')
-rw-r--r--field.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/field.c b/field.c
index 151fea68..0b9c1008 100644
--- a/field.c
+++ b/field.c
@@ -892,7 +892,7 @@ get_field(long requested, Func_ptr *assign)
char *rec_end = fields_arr[0]->stptr + fields_arr[0]->stlen;
if ( parse_extent > rec_end
- || (parse_extent > rec_start && parse_extent < rec_end))
+ || (parse_extent > rec_start && parse_extent < rec_end && requested == UNLIMITED-1))
NF = parse_high_water;
else if (parse_extent == rec_start) /* could be no match for FPAT */
NF = 0;
@@ -1601,7 +1601,6 @@ fpat_parse_field(long up_to, /* parse only up to this field number */
start = scan;
while (research(rp, scan, 0, (end - scan), regex_flags) != -1
&& nf < up_to) {
- regex_flags |= RE_NO_BOL;
if (REEND(rp, scan) > RESTART(rp, scan)) { /* if (RLENGTH > 0) */
non_empty = TRUE;