Skip to content

Commit

Permalink
saturating sub
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Dec 28, 2023
1 parent 9e7d67b commit 93ae424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/lte.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a> Lexer<'a> {
}

fn prev_char(&self) -> char {
self.bytes[self.cursor - 1] as char
self.bytes[self.cursor.saturating_sub(1)] as char
}

fn skip_whitespace(&mut self) {
Expand Down

0 comments on commit 93ae424

Please sign in to comment.