mirror of
https://git.disroot.org/80486DX2-66/polonium.git
synced 2024-11-09 15:02:20 +05:30
main.c: fix range check of chance value
This commit is contained in:
parent
4860ccd61e
commit
a6b39e3d1f
@ -115,9 +115,9 @@ static void parse_value(uint8_t destination, const char* arg) {
|
|||||||
uintmax_t result = atoumax_base10(arg);
|
uintmax_t result = atoumax_base10(arg);
|
||||||
switch (destination) {
|
switch (destination) {
|
||||||
case ARG_DEST_POSSIBILITY:
|
case ARG_DEST_POSSIBILITY:
|
||||||
if (result == 0 || result > UINT8_MAX) {
|
if (result == 0 || result > UINT16_MAX) {
|
||||||
FATAL_ERROR("Chance value should be in range [1..%" PRIu8 "]",
|
FATAL_ERROR("Chance value should be in range [1..%" PRIu16 "]",
|
||||||
UINT8_MAX);
|
UINT16_MAX);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user