Revision: 3732 http://trac.macosforge.org/projects/ruby/changeset/3732 Author: lsansonetti@apple.com Date: 2010-03-10 14:09:16 -0800 (Wed, 10 Mar 2010) Log Message: ----------- misc bugfix Modified Paths: -------------- MacRuby/branches/icu/encoding.h MacRuby/branches/icu/string.c Modified: MacRuby/branches/icu/encoding.h =================================================================== --- MacRuby/branches/icu/encoding.h 2010-03-10 20:32:52 UTC (rev 3731) +++ MacRuby/branches/icu/encoding.h 2010-03-10 22:09:16 UTC (rev 3732) @@ -301,7 +301,7 @@ long rb_str_chars_len(VALUE str); UChar rb_str_get_uchar(VALUE str, long pos); void rb_str_append_uchar(VALUE str, UChar c); -void rb_str_append_uchars(VALUE str, UChar *chars, long len); +void rb_str_append_uchars(VALUE str, const UChar *chars, long len); unsigned long rb_str_hash_uchars(const UChar *chars, long chars_len); long rb_uchar_strtol(UniChar *chars, long chars_len, long pos, long *end_offset); Modified: MacRuby/branches/icu/string.c =================================================================== --- MacRuby/branches/icu/string.c 2010-03-10 20:32:52 UTC (rev 3731) +++ MacRuby/branches/icu/string.c 2010-03-10 22:09:16 UTC (rev 3732) @@ -5766,7 +5766,7 @@ } void -rb_str_append_uchars(VALUE str, UChar *chars, long len) +rb_str_append_uchars(VALUE str, const UChar *chars, long len) { assert(chars != NULL && len >= 0); @@ -5898,7 +5898,7 @@ if (IS_RSTR(str)) { const long len_bytes = str_is_stored_in_uchars(RSTR(str)) ? UCHARS_TO_BYTES(len) : len; - assert(len_bytes < RSTR(str)->length_in_bytes); + assert(len_bytes <= RSTR(str)->length_in_bytes); RSTR(str)->length_in_bytes = len_bytes; } else {