diff --git a/plugins/check_load.c b/plugins/check_load.c
index 9de8ff78546ae6718e102ab9735c7f06a1735d4d..5503204a88509524b3ea7addc2b61d41e281a57b 100644 (file)
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
get_threshold(char *arg, double *th)
{
size_t i, n;
+ int valid = 0;
char *str = arg, *p;
n = strlen(arg);
th[i] = strtod(str, &p);
if(p == str) break;
+ valid = 1;
str = p + 1;
if(n <= (size_t)(str - arg)) break;
}
/* empty argument or non-floatish, so warn about it and die */
- if(!i) usage (_("Warning threshold must be float or float triplet!\n"));
+ if(!i && !valid) usage (_("Warning threshold must be float or float triplet!\n"));
if(i != 2) {
/* one or more numbers were given, so fill array with last