From 77636d0364d5df961834b64bff1a3bc8f50ce259 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 2 Oct 2004 11:30:40 +0000 Subject: * string.c (rb_str_sum): should use bignums when bits is greater than or equals to sizeof(long)*CHAR_BITS. [ruby-dev:24395] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index c6e43fd212..ac87b8d68f 100644 --- a/string.c +++ b/string.c @@ -4416,7 +4416,7 @@ rb_str_sum(argc, argv, str) ptr = p = RSTRING(str)->ptr; len = RSTRING(str)->len; pend = p + len; - if (bits > sizeof(long)*CHAR_BIT) { + if (bits >= sizeof(long)*CHAR_BIT) { VALUE sum = INT2FIX(0); while (p < pend) { -- cgit v1.2.3