From f2a79fecab88df0b01f1d5ab3cac15de212e3a2f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 8 Nov 2011 21:36:45 +0000 Subject: Fix bug resulting in corrupt (unsorted) map. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3607 a436a847-0d15-0410-975c-d299462d15a1 --- src/symap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/symap.c b/src/symap.c index cbbb590..e82e414 100644 --- a/src/symap.c +++ b/src/symap.c @@ -118,11 +118,11 @@ symap_search(const Symap* map, const char* sym, bool* exact) } upper = i - 1; } else { - lower = i + 1; + lower = ++i; } } - assert(strcmp(map->symbols[map->index[i] - 1], sym) > 0); + assert(!*exact || strcmp(map->symbols[map->index[i] - 1], sym) > 0); return i; } -- cgit v1.2.1