[augeas-devel] [PATCH 1 of 2] Initialize state->pos in lns_parse and lns_get
David Lutterkort
dlutter at redhat.com
Wed Jul 9 17:38:00 UTC 2008
1 file changed, 2 insertions(+)
src/get.c | 2 ++
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1215623350 25200
# Node ID fde82628a659edb0d30fb4b095ba31e3d9bca8a2
# Parent f45ac89119cd2afee7fd55f7bfc5fac29afdb520
Initialize state->pos in lns_parse and lns_get
Otherwise, get and parse on an empty string will produce a 'short
iteration' error, even if the empty string is acceptable for that lens.
diff -r f45ac89119cd -r fde82628a659 src/get.c
--- a/src/get.c Mon Jul 07 16:07:47 2008 -0700
+++ b/src/get.c Wed Jul 09 10:09:10 2008 -0700
@@ -744,6 +744,7 @@
state.split = &split;
state.text = text;
+ state.pos = text;
/* We are probably being overly cautious here: if the lens can't process
* all of TEXT, we should really fail somewhere in one of the sublenses.
@@ -841,6 +842,7 @@
state.split = &split;
state.text = text;
+ state.pos = text;
if (applies(lens, &split)) {
*dict = NULL;
More information about the augeas-devel
mailing list