Skip to content

Commit

Permalink
Fix panic when bitcoin hits 100k
Browse files Browse the repository at this point in the history
  • Loading branch information
WestXu committed Dec 5, 2024
1 parent e348f8a commit 08991a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl BtcEthMatrix {
&Rgb888::new(255, 255, 255),
&Rgb888::new(255, 255, 0),
),
32 - (major_cs.pixels[0].len() + 1),
32usize.saturating_sub(major_cs.pixels[0].len() + 1),
0,
);
}
Expand All @@ -86,7 +86,7 @@ impl BtcEthMatrix {
&Rgb888::new(255, 255, 255),
&Rgb888::new(200, 200, 200),
),
32 - (minor_cs.pixels[0].len() + 1),
32usize.saturating_sub(minor_cs.pixels[0].len() + 1),
5,
);
}
Expand Down Expand Up @@ -130,7 +130,7 @@ impl BtcTimeMatrix {
&Rgb888::new(255, 255, 255),
&Rgb888::new(255, 255, 0),
),
32 - (major_cs.pixels[0].len() + 1),
32usize.saturating_sub(major_cs.pixels[0].len() + 1),
0,
);
}
Expand All @@ -142,7 +142,7 @@ impl BtcTimeMatrix {
&Rgb888::new(255, 255, 255),
&Rgb888::new(200, 200, 200),
),
32 - (minor_cs.pixels[0].len() + 1),
32usize.saturating_sub(minor_cs.pixels[0].len() + 1),
5,
);

Expand Down

0 comments on commit 08991a0

Please sign in to comment.