From 78f5b54f1b2cdacfc4fab9b37cc71a1d195d9424 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 12 Jun 2010 17:13:54 +0000 Subject: * enc/trans/utf8_mac.trans (buf_apply): fix for patterns whose result is 2 bytes. [ruby-core:30751] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- enc/trans/utf8_mac.trans | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'enc/trans') diff --git a/enc/trans/utf8_mac.trans b/enc/trans/utf8_mac.trans index 3ceb07eeb4..0d69dba46a 100644 --- a/enc/trans/utf8_mac.trans +++ b/enc/trans/utf8_mac.trans @@ -150,10 +150,10 @@ buf_apply(int mode, struct from_utf8_mac_status *sp, unsigned char *o) next_info = get_info(next_info, sp); switch (next_info & 0x1F) { case THREEbt: - o[n++] = getBT1(next_info); case TWObt: + o[n++] = getBT1(next_info); o[n++] = getBT2(next_info); - o[n++] = getBT3(next_info); + if (THREEbt == (next_info & 0x1F)) o[n++] = getBT3(next_info); if (mode == 3) { buf_clear(sp); } -- cgit v1.2.3