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) =

View File

@@ -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 ()

BIN
shf

Binary file not shown.