diff --git a/libraries/libmdb/midl.c b/libraries/libmdb/midl.c index 9ee100d..8de61e3 100644 --- a/libraries/libmdb/midl.c +++ b/libraries/libmdb/midl.c @@ -232,7 +232,7 @@ mdb_midl_sort( MDB_IDL ids ) ids[l+1] = ids[j]; ids[j] = a; jstack += 2; - if (ir-i+1 >= j-1) { + if (ir-i+1 >= j-l) { istack[jstack] = ir; istack[jstack-1] = i; ir = j-1;