Fix off by one error and add ui test.

This commit is contained in:
miam-miam100 2022-07-20 13:40:45 +01:00
parent 62187b12c2
commit f8dfc4bf35
No known key found for this signature in database
GPG key ID: 0C3730101953F7DD
3 changed files with 17 additions and 3 deletions

View file

@ -485,7 +485,7 @@ impl<'a, 'b> Context<'a, 'b> {
if let Some(span) = fmt.width_span {
let span = self.fmtsp.from_inner(InnerSpan::new(span.start, span.end));
match fmt.width {
parse::CountIsParam(pos) if pos > self.num_args() => {
parse::CountIsParam(pos) if pos >= self.num_args() => {
e.span_label(
span,
&format!(