From: Niels Möller Date: Sun, 6 Oct 2002 21:24:31 +0000 (+0200) Subject: * sexp.c (sexp_iterator_assoc): Advance the iterator to the X-Git-Tag: nettle_1.7_release_20030311~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=080ebce5a18b481e4f02d0f0a1e8dc0ace1825a0;p=thirdparty%2Fnettle.git * sexp.c (sexp_iterator_assoc): Advance the iterator to the element after a matching tag, before recording it. Rev: src/nettle/sexp.c:1.8 --- diff --git a/sexp.c b/sexp.c index ba2a8f83..d066dea4 100644 --- a/sexp.c +++ b/sexp.c @@ -266,12 +266,16 @@ sexp_iterator_assoc(struct sexp_iterator *iterator, /* We don't allow duplicates */ return 0; + /* Advance to point to value */ + if (!sexp_iterator_next(iterator)) + return 0; + found[i] = 1; nfound++; /* Record this position. */ values[i] = *iterator; - + break; } }