]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* sexp.c (sexp_iterator_assoc): Advance the iterator to the
authorNiels Möller <nisse@lysator.liu.se>
Sun, 6 Oct 2002 21:24:31 +0000 (23:24 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 6 Oct 2002 21:24:31 +0000 (23:24 +0200)
element after a matching tag, before recording it.

Rev: src/nettle/sexp.c:1.8

sexp.c

diff --git a/sexp.c b/sexp.c
index ba2a8f83639f5d6b5768e9701ec68e189434eb45..d066dea44d6fc930cf9722423994cdd0b04b9835 100644 (file)
--- 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;
                    }
                }