summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 11:18:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-11 11:18:10 (GMT)
commit18030d18cf42b4868cc702e58e7170d1897c2083 (patch)
tree75a71c38151121ad3cd93aad5806698ae9d6513f /transcode.c
parent1549894a0699abdfab1fbba0e468afd3f2f990b3 (diff)
transcode.c: fill terminator
* transcode.c (str_encode_associate): fill terminator after conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/transcode.c b/transcode.c
index 54fc316..88908c3 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2760,6 +2760,7 @@ str_encode_associate(VALUE str, int encidx)
int cr = 0;
rb_enc_associate_index(str, encidx);
+ rb_str_fill_terminator(str);
/* transcoded string never be broken. */
if (rb_enc_asciicompat(rb_enc_from_index(encidx))) {