From f1d1727bf6d52f359ada7a40e85389cca16b5bf6 Mon Sep 17 00:00:00 2001 From: orange Date: Fri, 5 Jul 2013 16:02:52 +0200 Subject: [PATCH] add missing else --- binsearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binsearch.c b/binsearch.c index b00f2db..c7f210e 100644 --- a/binsearch.c +++ b/binsearch.c @@ -29,7 +29,7 @@ int binsearchr(int array[], int from, int to, int target) { if (array[m] == target) { return m; - } if (array[m] > target) { + } else if (array[m] > target) { return binsearchr(array, from, m-1, target); } else { /* array[m] < target */