summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index ab60aba1c1..ed51ee4838 100644
--- a/re.c
+++ b/re.c
@@ -105,7 +105,7 @@ rb_memsearch(x0, m, y0, n)
int d;
unsigned long hx, hy;
-#define KR_REHASH(a, b, h) (((h) << 1) - ((a)<<d) + (b))
+#define KR_REHASH(a, b, h) (((h) << 1) - (((unsigned long)(a))<<d) + (b))
if (m > n) return -1;
s = y; e = s + n - m;