summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 17:18:01 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-12 17:18:01 +0000
commit1b5c41b460bf0713e8abf12a0c067aecb576a87c (patch)
tree0428e224de73f7c9a0e5b5ba82bed7a178840ca3 /enc
parentb27ec368b397cef75f5fc1a5057bdf29f7aa41b8 (diff)
merge revision(s) 28307:
* 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/branches/ruby_1_9_2@28308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-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);
}