mirror of
https://gitlab.com/veloren/veloren.git
synced 2025-07-25 12:52:26 +00:00
Fix: the /time
command has been fixed in accordance to issue #1622
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user