Fixed binary_search when list value was same as search value.

This commit is contained in:
Paul Romano 2011-12-09 16:09:52 -05:00
parent 0205125d7b
commit 02a727748f

View file

@ -48,7 +48,7 @@ contains
! Find values at midpoint
array_index = L + (R - L)/2
testval = array(array_index)
if (val > testval) then
if (val >= testval) then
L = array_index
elseif (val < testval) then
R = array_index