amend another bug

This commit is contained in:
2024-07-18 22:27:41 +01:00
parent 898249a1a8
commit bd8edc3bf4

View File

@@ -1396,16 +1396,17 @@ struct
val str = String.substring (rightStringsHd, 0, strLength) val str = String.substring (rightStringsHd, 0, strLength)
val midpoint = binSearch (String.size str - 1, rightLinesHd) val midpoint = binSearch (String.size str - 1, rightLinesHd)
val newLeftLines = val newLeftLines =
if midpoint >= 0 then if midpoint < 0 orelse Vector.length rightLinesHd = 0
then Vector.fromList []
else
let let
val _ = println "1390" val _ = println "1390"
val _ = println ("midpoint = " ^ Int.toString midpoint)
val slice = VectorSlice.slice val slice = VectorSlice.slice
(rightLinesHd, 0, SOME (midpoint + 1)) (rightLinesHd, 0, SOME (midpoint + 1))
in in
VectorSlice.vector slice VectorSlice.vector slice
end end
else
Vector.fromList []
val _ = println "1340" val _ = println "1340"
in in
{ idx = curIdx + strLength { idx = curIdx + strLength