chiark / gitweb /
shared: "max" in the string->number conversion is meant to be inclusive
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 30 Oct 2012 14:45:50 +0000 (15:45 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Tue, 30 Oct 2012 14:46:49 +0000 (15:46 +0100)
src/shared/util.h

index ca80bfe..284035c 100644 (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;                                       \
         }                                                               \