From f215102d83e78e7f7095112aeeefa2016299efd9 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Mon, 17 Sep 2007 12:07:42 +0000 Subject: [PATCH] clear property if not found --- libconfig/config_find_indexed_property.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libconfig/config_find_indexed_property.c b/libconfig/config_find_indexed_property.c index f5b5537..d86aa0a 100644 --- a/libconfig/config_find_indexed_property.c +++ b/libconfig/config_find_indexed_property.c @@ -36,8 +36,10 @@ int config_find_indexed_property(int8_t *configuration, char *index_name, char * { if (name == NULL) return last_index; - return -1; + break; } } + if (property) + property[0] = 0; /* clear property */ return -1; }