mirror of
https://github.com/LeMoonStar/AoC24.git
synced 2025-07-07 16:05:31 +02:00
🐛 Day 2: Fixed uh.-... simply wrong behaviour in part 2
This commit is contained in:
parent
b2c8337177
commit
3b942efd71
1 changed files with 2 additions and 2 deletions
|
@ -22,12 +22,12 @@ impl Report {
|
|||
|
||||
if !Self::safe_comparison(self.0[i - 1], self.0[i], &mut direction) {
|
||||
if tolerance > 0 {
|
||||
if (i + 1 >= self.0.len()) {
|
||||
if i + 1 >= self.0.len() {
|
||||
return true;
|
||||
}
|
||||
|
||||
tolerance -= 1;
|
||||
if !Self::safe_comparison(self.0[i - 1], self.0[i + 1], &mut direction) {
|
||||
if Self::safe_comparison(self.0[i - 1], self.0[i + 1], &mut direction) {
|
||||
skip = true;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue