shared: "max" in the string->number conversion is meant to be inclusive

This commit is contained in:
Michal Schmidt 2012-10-30 15:45:50 +01:00
parent f8b69d1dfc
commit 8511dd1871

View file

@ -339,7 +339,7 @@ unsigned long long random_ull(void);
if (name##_table[i] && \
streq(name##_table[i], s)) \
return i; \
if (safe_atou(s, &u) >= 0 && u < max) \
if (safe_atou(s, &u) >= 0 && u <= max) \
return (type) u; \
return (type) -1; \
} \