diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-01 09:37:04 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-01 09:37:04 +0000 |
commit | 0ca24ab21d507f4fd3130874e3b0c2902e72cf90 (patch) | |
tree | c0b7b1a68dc14796b2acae22381739f6c41a561e /string.c | |
parent | 73dae42f511b359a1c649b253a3558cc129db91e (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |