changeset 412:357ac44f4720 libavutil

Always set next correctly, even if a matching element is found (that is how it is documented and used).
author michael
date Fri, 04 Jan 2008 10:14:21 +0000
parents d25e027364d6
children a54e20281de9
files tree.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tree.c	Thu Dec 27 01:53:02 2007 +0000
+++ b/tree.c	Fri Jan 04 10:14:21 2008 +0000
@@ -35,6 +35,10 @@
             if(next) next[(v>>31)^1]= t->elem;
             return av_tree_find(t->child[v>>31], key, cmp, next);
         }else{
+            if(next){
+                av_tree_find(t->child[0], key, cmp, next);
+                av_tree_find(t->child[1], key, cmp, next);
+            }
             return t->elem;
         }
     }