Prevent potential value overflow
This commit is contained in:
parent
228e1a7293
commit
d0a80c7960
@ -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],
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user