summaryrefslogtreecommitdiffstats
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
commit873a66ec9e8eba0eee6bdf79e7ef5efc49625df6 (patch)
tree84c2070cd1bcb92b650af3679adeb57238243f21 /re.c
parent1c5689b4ff6786e763d7c3bf2c4d6ba255d1d47a (diff)
downloadruby-873a66ec9e8eba0eee6bdf79e7ef5efc49625df6.tar.gz
ruby-873a66ec9e8eba0eee6bdf79e7ef5efc49625df6.tar.xz
ruby-873a66ec9e8eba0eee6bdf79e7ef5efc49625df6.zip
* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
[ruby-core:06721] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@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 ab60aba1c..ed51ee483 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;