summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-01 09:37:04 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-01 09:37:04 +0000
commit0ca24ab21d507f4fd3130874e3b0c2902e72cf90 (patch)
treec0b7b1a68dc14796b2acae22381739f6c41a561e /string.c
parent73dae42f511b359a1c649b253a3558cc129db91e (diff)
merges r30779 from trunk into ruby_1_9_2.
-- * string.c (str_utf8_nth): fixed a conditon of optimized lead byte counting. [Bug #4366][ruby-dev:43170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 5c88353e75..aa3029adbd 100644
--- a/string.c
+++ b/string.c
@@ -1487,7 +1487,7 @@ rb_str_offset(VALUE str, long pos)
static char *
str_utf8_nth(const char *p, const char *e, long nth)
{
- if ((int)SIZEOF_VALUE < e - p && (int)SIZEOF_VALUE * 2 < nth) {
+ if ((int)SIZEOF_VALUE * 2 < e - p && (int)SIZEOF_VALUE * 2 < nth) {
const VALUE *s, *t;
const VALUE lowbits = sizeof(VALUE) - 1;
s = (const VALUE*)(~lowbits & ((VALUE)p + lowbits));