diff --git a/wellen/src/vcd.rs b/wellen/src/vcd.rs index 6836384..49725a5 100644 --- a/wellen/src/vcd.rs +++ b/wellen/src/vcd.rs @@ -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(());