aboutsummaryrefslogtreecommitdiffstats
path: root/enc/trans
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 17:13:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 17:13:54 +0000
commit78f5b54f1b2cdacfc4fab9b37cc71a1d195d9424 (patch)
treea453088e199e488b37e4e1e4c74a2cb73043c1f1 /enc/trans
parent051af24359916791ee09cc6c685d9668e780b61f (diff)
downloadruby-78f5b54f1b2cdacfc4fab9b37cc71a1d195d9424.tar.gz
* 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
Diffstat (limited to 'enc/trans')
-rw-r--r--enc/trans/utf8_mac.trans4
1 files changed, 2 insertions, 2 deletions
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);
}