Fix bounds check
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
ci/woodpecker/pr/all-checks-complete Pipeline was successful

This commit is contained in:
Smaug123
2023-12-10 13:43:33 +00:00
parent f28551bdf0
commit 13505a0cdf

View File

@@ -88,7 +88,7 @@ module Day10 =
let mutable pointB =
let pos = ofRowAndCol lineLength (startLine - 1) startCol
match s.[pos] with
match if pos >= 0 then s.[pos] else 'n' with
| '|'
| '7'
| 'F' -> pos
@@ -96,7 +96,7 @@ module Day10 =
let pos = ofRowAndCol lineLength (startLine + 1) startCol
match s.[pos] with
match if pos < s.Length then s.[pos] else 'n' with
| '|'
| 'L'
| 'J' -> pos
@@ -104,7 +104,7 @@ module Day10 =
let pos = ofRowAndCol lineLength startLine (startCol + 1)
match s.[pos] with
match if pos < s.Length then s.[pos] else 'n' with
| '-'
| 'J'
| '7' -> pos