summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 05:11:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 05:11:18 +0000
commit7ff5d02f8b7d5af37032b55e2066245914c9a6cb (patch)
tree53c2e4dfd9eaf8490faaa12d75793d30cf513722 /re.c
parent67673f6b478302f7350057e46961a7b25e56a0f3 (diff)
* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
[ruby-core:06721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;