aboutsummaryrefslogtreecommitdiffstats
path: root/transcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transcode.c b/transcode.c
index 370bd06c33..1b8e8ee9e5 100644
--- a/transcode.c
+++ b/transcode.c
@@ -311,14 +311,14 @@ str_transcode(int argc, VALUE *argv, VALUE *self)
return -1;
}
- my_transcoding.transcoder = my_transcoder;
-
while (!final_encoding) { /* loop for multistep transcoding */
/* later, maybe use smaller intermediate strings for very long strings */
if (!(my_transcoder = transcode_dispatch(from_e, to_e))) {
rb_raise(rb_eArgError, "transcoding not supported (from %s to %s)", from_e, to_e);
}
+ my_transcoding.transcoder = my_transcoder;
+
if (my_transcoder->preprocessor) {
fromp = sp = (unsigned char *)RSTRING_PTR(str);
slen = RSTRING_LEN(str);