mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'lioncat2002/fix_time_command' into 'master'
Fix: the `/time` command has been fixed in accordance to issue #1622 See merge request veloren/veloren!3947
This commit is contained in:
commit
f997f11a66
@ -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