fix exception in bin-search.sml, by making sure that forwardLinearSearch always starts at 0 or more
This commit is contained in:
@@ -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) =
|
||||
|
||||
@@ -63,6 +63,9 @@ struct
|
||||
val _ = TextIO.closeIn io
|
||||
val app = AppType.init (lineGap, 1920, 1080)
|
||||
|
||||
(* todo: remove temp line below which tests search list *)
|
||||
val app = BuildSearchList.build (app, 0, lineGap, "val")
|
||||
|
||||
(* create mailboxes for CML communication *)
|
||||
val inputMailbox = Mailbox.mailbox ()
|
||||
val drawMailbox = Mailbox.mailbox ()
|
||||
|
||||
Reference in New Issue
Block a user