mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-07-12 08:42:20 +08:00
Fix time overflow
This commit is contained in:
@@ -161,7 +161,9 @@ pub fn set_time(current_time: u64, uid: i64, max: bool) -> u64 {
|
||||
return current_time;
|
||||
}
|
||||
|
||||
let time_since_set = current_time - time_set;
|
||||
let time_since_set = if current_time > time_set {
|
||||
current_time - time_set
|
||||
} else { 0 };
|
||||
return server_time + time_since_set;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user