Fix bug
This commit is contained in:
parent
19a053a288
commit
7c6a4e5ece
@ -56,8 +56,8 @@ impl Tool for RandomInteger {
|
|||||||
Error::expect_function_argument_amount(self.info().identifier, min_max.len(), 2)?;
|
Error::expect_function_argument_amount(self.info().identifier, min_max.len(), 2)?;
|
||||||
|
|
||||||
let min = min_max[0].as_int()?;
|
let min = min_max[0].as_int()?;
|
||||||
let max = min_max[1].as_int()?;
|
let max = min_max[1].as_int()? + 1;
|
||||||
let integer = rand::thread_rng().gen_range(min..=max);
|
let integer = rand::thread_rng().gen_range(min..max);
|
||||||
|
|
||||||
Ok(Value::Integer(integer))
|
Ok(Value::Integer(integer))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user