summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 29d083a230..1186b3b81b 100644
--- a/string.c
+++ b/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;