diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-02 11:30:40 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-02 11:30:40 +0000 |
| commit | 8abfebeda328051969c664a0a44a73b030737d9b (patch) | |
| tree | 08daddca550394c954a1bdddc3d415f7d54dcb92 /string.c | |
| parent | dc3fbe6ea65935a5e08bd5a9e22b805c47a141dc (diff) | |
| download | ruby-8abfebeda328051969c664a0a44a73b030737d9b.tar.gz ruby-8abfebeda328051969c664a0a44a73b030737d9b.tar.xz ruby-8abfebeda328051969c664a0a44a73b030737d9b.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@6982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |
