mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_sum): use UCHAR_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
750c9916e2
commit
d0fa628d06
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Mar 20 22:51:46 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* string.c (rb_str_sum): use UCHAR_MAX.
|
||||
|
||||
Sat Mar 20 19:16:42 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* tool/transcode-tblgen.rb (ActionMap.unambiguous_action): use
|
||||
|
|
2
string.c
2
string.c
|
@ -6563,7 +6563,7 @@ rb_str_sum(int argc, VALUE *argv, VALUE str)
|
|||
pend = p + len;
|
||||
|
||||
while (p < pend) {
|
||||
if (FIXNUM_MAX - 255 < sum0) {
|
||||
if (FIXNUM_MAX - UCHAR_MAX < sum0) {
|
||||
sum = rb_funcall(sum, '+', 1, LONG2FIX(sum0));
|
||||
str_mod_check(str, ptr, len);
|
||||
sum0 = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue