Skip to content

Commit

Permalink
Fix wast error line numbers; previously off by one (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrown authored and alexcrichton committed Dec 4, 2019
1 parent 570bd7e commit 3558d41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wast/src/wast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl WastContext {
};
let context = |sp: wast::Span| {
let (line, col) = sp.linecol_in(wast);
format!("for directive on {}:{}:{}", filename, line, col)
format!("for directive on {}:{}:{}", filename, line + 1, col)
};

let buf = wast::parser::ParseBuffer::new(wast).map_err(adjust_wast)?;
Expand Down

0 comments on commit 3558d41

Please sign in to comment.