Skip to content

Commit

Permalink
fix one off by one bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Nov 14, 2024
1 parent f7db5ee commit 2842ecf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wellen/src/vcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,9 @@ fn parse_body(
state = match parse_first_token(&first)? {
FirstTokenResult::Time(value) => {
// check to see if this time value is already past the stop position
if pos > stop_pos {
// we subtract one to account for the fact that the current
// character is a whitespace and thus not part of the time command
if pos - 1 > stop_pos {
// exit
progress_report.report(pos, true);
return Ok(());
Expand Down

0 comments on commit 2842ecf

Please sign in to comment.