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:
Isse 2023-05-24 16:47:36 +00:00
commit f997f11a66

View File

@ -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));
}