Skip to content

Commit

Permalink
Fix parsing error message (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo authored Aug 22, 2023
1 parent cefd8bc commit bb38d35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ fn main() {
.map_location(|byte_offset| {
let byte_offset = byte_offset - program_offset;
let (line_num, sum_offset) = std::iter::once(0)
.chain(program.split_inclusive('\n').scan(
.chain(program[program_offset..].split_inclusive('\n').scan(
0,
|sum_offset, l| {
*sum_offset += l.len();
Expand Down

0 comments on commit bb38d35

Please sign in to comment.