fix exception in bin-search.sml, by making sure that forwardLinearSearch always starts at 0 or more

This commit is contained in:
2024-11-15 09:24:48 +00:00
parent c0c1a7c885
commit 025f9d2bf4
3 changed files with 4 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ struct
helpBinSearch (findNum, vec, low, mid - 1)
end
else
forwardLinearSearch (findNum, mid, vec)
forwardLinearSearch (findNum, Int.max (mid, 0), vec)
end
in
fun equalOrMore (findNum, vec) =