summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/random.c b/random.c
index d05fe6d9c6..7244a00538 100644
--- a/random.c
+++ b/random.c
@@ -911,7 +911,7 @@ rb_random_int32(VALUE obj)
rb_random_t *rnd = try_get_rnd(obj);
if (!rnd) {
#if SIZEOF_LONG * CHAR_BIT > 32
- VALUE lim = ULONG2NUM(0x100000000);
+ VALUE lim = ULONG2NUM(0x100000000UL);
#elif defined HAVE_LONG_LONG
VALUE lim = ULL2NUM((LONG_LONG)0xffffffff+1);
#else