From: Ben Pfaff Date: Thu, 7 Jun 2007 05:46:37 +0000 (+0000) Subject: (binary_search): Fix assertion. X-Git-Tag: v0.6.0~441 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0097b71cac1297fba88b3c019836090dd0cf639c;p=pspp-builds.git (binary_search): Fix assertion. --- diff --git a/src/libpspp/ChangeLog b/src/libpspp/ChangeLog index 43da54ee..e92778cb 100644 --- a/src/libpspp/ChangeLog +++ b/src/libpspp/ChangeLog @@ -1,3 +1,7 @@ +2007-06-06 Ben Pfaff + + * array.c (binary_search): Fix assertion. + 2007-06-06 Ben Pfaff Add error propagation layer. Patch #5916, slightly revised. diff --git a/src/libpspp/array.c b/src/libpspp/array.c index f375f83d..56afb1ae 100644 --- a/src/libpspp/array.c +++ b/src/libpspp/array.c @@ -531,7 +531,7 @@ binary_search (const void *array, size_t count, size_t size, void *value, algo_compare_func *compare, const void *aux) { - assert (array != NULL); + assert (array != NULL || count == 0); assert (count <= INT_MAX); assert (compare != NULL);