From 15021b11c9f0ec2f26ab879fb1004a429365f3cc Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 2 Jun 2014 16:08:46 +0800 Subject: [PATCH] reset prefix_len = 0 --- src/node.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.c b/src/node.c index b02eefb..b64f0cc 100644 --- a/src/node.c +++ b/src/node.c @@ -495,6 +495,7 @@ node * r3_tree_insert_pathl(node *tree, const char *path, int path_len, void * d edge * r3_node_find_common_prefix(node *n, char *path, int path_len, int *prefix_len, char **errstr) { int i = 0; int prefix = 0; + *prefix_len = 0; edge *e = NULL; for(i = 0 ; i < n->edge_len ; i++ ) { // ignore all edges with slug