summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2014-06-28 09:24:01 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2014-06-28 09:24:01 +0200
commitb084415e278d54c6f9ee8406b1af8adc2364576c (patch)
tree73ab4d164b248fdfa28a9acceb1efe32981a4913 /src/coding.c
parent90f33ead9b23b116751754cce3033059b9e40754 (diff)
downloademacs-b084415e278d54c6f9ee8406b1af8adc2364576c.tar.gz
Fixes: debbugs:17865
* coding.c (encode_coding_utf_8): Correctly count produced_chars also in unibyte case.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index 654e39c0e3d..bd4a8be08b3 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1549,8 +1549,8 @@ encode_coding_utf_8 (struct coding_system *coding)
*dst++ = CHAR_TO_BYTE8 (c);
else
CHAR_STRING_ADVANCE_NO_UNIFY (c, dst);
- produced_chars++;
}
+ produced_chars = dst - (coding->destination + coding->produced);
}
record_conversion_result (coding, CODING_RESULT_SUCCESS);
coding->produced_char += produced_chars;