ruby-changes:14619
From: naruse <ko1@a...>
Date: Fri, 29 Jan 2010 09:56:26 +0900 (JST)
Subject: [ruby-changes:14619] Ruby:r26464 (trunk): * enc/trans/utf8_mac.trans (buf_shift_char): don't see uninitialised
naruse 2010-01-29 09:56:10 +0900 (Fri, 29 Jan 2010) New Revision: 26464 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26464 Log: * enc/trans/utf8_mac.trans (buf_shift_char): don't see uninitialised value. [ruby-dev:40233] Modified files: trunk/ChangeLog trunk/enc/trans/utf8_mac.trans Index: ChangeLog =================================================================== --- ChangeLog (revision 26463) +++ ChangeLog (revision 26464) @@ -1,3 +1,8 @@ +Fri Jan 29 09:43:30 2010 NARUSE, Yui <naruse@r...> + + * enc/trans/utf8_mac.trans (buf_shift_char): don't see uninitialised + value. [ruby-dev:40233] + Fri Jan 29 01:42:24 2010 Yukihiro Matsumoto <matz@r...> * lib/delegate.rb (Delegator#initialize_copy): use initialize_copy Index: enc/trans/utf8_mac.trans =================================================================== --- enc/trans/utf8_mac.trans (revision 26463) +++ enc/trans/utf8_mac.trans (revision 26464) @@ -85,10 +85,10 @@ void buf_shift_char(struct from_utf8_mac_status *sp) { - while (sp->beg != sp->end) { + if (sp->beg == sp->end) return; + do { buf_shift(sp); - if ((sp->buf[sp->beg] & 0xC0) != 0x80) break; - } + } while (sp->beg != sp->end && (sp->buf[sp->beg] & 0xC0) == 0x80); } void -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/