Sanity check seconds, and lock to 0 or above. Disallow negative time
This commit is contained in:
parent
d4a6a3609e
commit
730535d4b8
2 changed files with 4 additions and 1 deletions
|
@ -50,11 +50,14 @@ class Time {
|
|||
hours = 0;
|
||||
minutes = 0;
|
||||
this.seconds = seconds;
|
||||
if (this.seconds < 0) this.seconds = 0;
|
||||
|
||||
autofix();
|
||||
}
|
||||
|
||||
void autofix() {
|
||||
int totalSeconds = getTotalSeconds();
|
||||
if (totalSeconds < 0) totalSeconds = 0;
|
||||
|
||||
int one_hour = (1 * 60 * 60);
|
||||
int one_minute = (1 * 60);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: libac_flutter
|
||||
description: "Aria's Creations code library"
|
||||
version: 1.0.18
|
||||
version: 1.0.19
|
||||
homepage: "https://zontreck.com"
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue