Skip to content

Commit

Permalink
pio: Assembler: fix issue in diag when tokenizer has index on newline (
Browse files Browse the repository at this point in the history
  • Loading branch information
Grazfather authored Jan 9, 2025
1 parent 85fa438 commit af5f3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion port/raspberrypi/rp2xxx/src/hal/pio/assembler.zig
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fn format_compile_error(comptime message: []const u8, comptime source: []const u
var line_it = std.mem.tokenize(u8, source, "\n\r");
while (line_it.next()) |line| : (line_num += 1) {
line_str = line_str ++ "\n" ++ line;
if (line_it.index > index) {
if (line_it.index >= index) {
column = line.len - (line_it.index - index);
line_str = line;
break;
Expand Down

0 comments on commit af5f3d8

Please sign in to comment.