mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-06 21:24:06 -04:00
fixed log(0) error
This commit is contained in:
parent
3f460f015f
commit
4b83fe4759
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ impl<'a> Display for LogEntryDisplay<'a> {
|
|||
let line_start = self.src.get(..=span.0).unwrap_or("").lines().count();
|
||||
let line_end = self.src.get(..span.1).unwrap_or("").lines().count();
|
||||
|
||||
let padding = line_end.ilog10() as usize;
|
||||
let padding = if line_end == 0 {1} else {line_end.ilog10() as usize};
|
||||
|
||||
let start = self
|
||||
.src
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue