aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 81fda21f1cb..d865bd139bf 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -4433,8 +4433,13 @@ code_convert_string (str, coding, encodep, nocopy)
4433 if (encodep) 4433 if (encodep)
4434 str = make_unibyte_string (buf, len + coding->produced); 4434 str = make_unibyte_string (buf, len + coding->produced);
4435 else 4435 else
4436 str = make_string_from_bytes (buf, len + coding->produced_char, 4436 {
4437 len + coding->produced); 4437 int chars= (coding->fake_multibyte
4438 ? multibyte_chars_in_text (buf + from, coding->produced)
4439 : coding->produced_char);
4440 str = make_multibyte_string (buf, len + chars, len + coding->produced);
4441 }
4442
4438 return str; 4443 return str;
4439} 4444}
4440 4445