summaryrefslogtreecommitdiff
path: root/src/helper/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/command.c')
-rw-r--r--src/helper/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index 5dbc047e..bea480cc 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -872,9 +872,9 @@ long jim_global_long(const char *variable)
*ul = func(str, &end, 0); \
if (*end) \
return ERROR_COMMAND_ARGUMENT_INVALID; \
- if (*ul == max) \
+ if ((max == *ul) && (ERANGE == errno)) \
return ERROR_COMMAND_ARGUMENT_OVERFLOW; \
- if (min && min == *ul) \
+ if (min && (min == *ul) && (ERANGE == errno)) \
return ERROR_COMMAND_ARGUMENT_UNDERFLOW; \
return ERROR_OK; \
}