Fix: the /time command has been fixed in accordance to issue #1622

This commit is contained in:
Kittycat 2023-05-24 16:47:36 +00:00 committed by Isse
parent 19342daa8d
commit 9eb4931822

View File

@ -1017,6 +1017,10 @@ fn handle_time(
), ),
Some(n) => match n.parse::<f64>() { Some(n) => match n.parse::<f64>() {
Ok(n) => { Ok(n) => {
// Incase the number of digits in the number is greater than 16
if n >= 1e17 {
return Err(format!("{} is invalid, cannot be larger than 16 digits", n));
}
if n < 0.0 { if n < 0.0 {
return Err(format!("{} is invalid, cannot be negative.", n)); return Err(format!("{} is invalid, cannot be negative.", n));
} }