Prevent potential value overflow

This commit is contained in:
Pierre HUBERT 2024-09-23 21:49:45 +02:00
parent 228e1a7293
commit d0a80c7960

View File

@ -45,7 +45,7 @@ impl ConsumptionHistoryFile {
fn new_memory(day: u64) -> Self {
Self {
day,
buff: vec![0; 3600 * 24 / TIME_INTERVAL],
buff: vec![0; (3600 * 24 / TIME_INTERVAL) + 1],
}
}