Commit 96a7e9e
authored
Fix off-by-one error in validation within
The incoming line number is 1-indexed (not 0-indexed), so while the
lower limit was correctly set to 1, the upper limit was set to
`FileLines.Count` which could be 0, but 0 lines implies an upper limit
of 1 with this indexing. See `ScriptFile.GetLine` for the only other use
of this 1-index range validation.GetOffsetAtPosition (#1669)1 parent 3ea4eb9 commit 96a7e9e
File tree
1 file changed
+1
-1
lines changed- src/PowerShellEditorServices/Services/TextDocument
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
0 commit comments