aboutsummaryrefslogtreecommitdiffstats
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 bd76e17f7c..18f74fa079 100644
--- a/re.c
+++ b/re.c
@@ -105,7 +105,7 @@ rb_memsearch(char *x0, long m, char *y0, long n)
int d;
unsigned long hx, hy;
-#define KR_REHASH(a, b, h) (((h) << 1) - ((long)(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;