aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/map.c b/map.c
index 57dc761..cff659e 100644
--- a/map.c
+++ b/map.c
@@ -68,7 +68,7 @@ void *map_closest(const Map *map, const char *prefix)
if (v)
return v;
const Map *m = map_prefix(map, prefix);
- if (!m->v)
+ if (map_empty(m))
errno = ENOENT;
return m->v;
}