diff options
Diffstat (limited to 'lib/libutil/expand_number.c')
-rw-r--r-- | lib/libutil/expand_number.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/expand_number.c b/lib/libutil/expand_number.c index d1882bd4..9bb0308 100644 --- a/lib/libutil/expand_number.c +++ b/lib/libutil/expand_number.c @@ -67,7 +67,7 @@ expand_number(const char *buf, uint64_t *num) } #define SHIFT(n, b) \ - do { if ((n << b) < n) goto overflow; n <<= b; } while (0) + do { if (((n << b) >> b) != n) goto overflow; n <<= b; } while (0) switch (tolower((unsigned char)*endptr)) { case 'e': |