mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix: the /time
command has been fixed in accordance to issue #1622
This commit is contained in:
parent
19342daa8d
commit
9eb4931822
@ -1017,6 +1017,10 @@ fn handle_time(
|
||||
),
|
||||
Some(n) => match n.parse::<f64>() {
|
||||
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 {
|
||||
return Err(format!("{} is invalid, cannot be negative.", n));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user