diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-14 05:50:46 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-14 05:50:46 +0000 |
commit | 7f80e833f34a68deca06d5044dd03315d200b2b9 (patch) | |
tree | 11a3ffe2f89238c8ccfb623458a93bc6aac29249 /transcode.c | |
parent | 0e27cd8c4f88f0948494ddb67d8bf390284e5afe (diff) | |
download | ruby-7f80e833f34a68deca06d5044dd03315d200b2b9.tar.gz ruby-7f80e833f34a68deca06d5044dd03315d200b2b9.tar.xz ruby-7f80e833f34a68deca06d5044dd03315d200b2b9.zip |
* transcode.c (transcode_restartable0): revert last commit because
this change cause SEGV at test-all.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/transcode.c b/transcode.c index b1d1773ce..7d2d115cb 100644 --- a/transcode.c +++ b/transcode.c @@ -540,16 +540,15 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos, follow_info: switch (next_info & 0x1F) { case NOMAP: - { - const unsigned char *char_start; - size_t char_len, i = 0; - char_start = transcode_char_start(tc, *in_pos, inchar_start, in_p, &char_len); - while (i < char_len) { - SUSPEND_OBUF(3); - *out_p++ = char_start[i++]; - } - } - continue; + { + const unsigned char *pend = in_p; + in_p = inchar_start; + while (in_p < pend) { + next_byte = (unsigned char)*in_p++; + SUSPEND_OBUF(3); *out_p++ = next_byte; + } + } + continue; case 0x00: case 0x04: case 0x08: case 0x0C: case 0x10: case 0x14: case 0x18: case 0x1C: SUSPEND_AFTER_OUTPUT(25); |