From 7675b00a64ab81e88653563443b16da2a5ac41f9 Mon Sep 17 00:00:00 2001 From: kmiku7 Date: Sun, 23 Aug 2015 16:47:42 +0800 Subject: [PATCH] fix boundary case for _dictNextPower --- src/dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dict.c b/src/dict.c index 69fb3b8f8..210d50dcd 100644 --- a/src/dict.c +++ b/src/dict.c @@ -940,7 +940,7 @@ static unsigned long _dictNextPower(unsigned long size) { unsigned long i = DICT_HT_INITIAL_SIZE; - if (size >= LONG_MAX) return LONG_MAX; + if (size >= LONG_MAX) return LONG_MAX + 1LU; while(1) { if (i >= size) return i;