diff options
| author | Andreas Schwab | 2014-06-28 09:24:01 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2014-06-28 09:24:01 +0200 |
| commit | b084415e278d54c6f9ee8406b1af8adc2364576c (patch) | |
| tree | 73ab4d164b248fdfa28a9acceb1efe32981a4913 /src/coding.c | |
| parent | 90f33ead9b23b116751754cce3033059b9e40754 (diff) | |
| download | emacs-b084415e278d54c6f9ee8406b1af8adc2364576c.tar.gz emacs-b084415e278d54c6f9ee8406b1af8adc2364576c.zip | |
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.c | 2 |
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) | |||
| 1549 | *dst++ = CHAR_TO_BYTE8 (c); | 1549 | *dst++ = CHAR_TO_BYTE8 (c); |
| 1550 | else | 1550 | else |
| 1551 | CHAR_STRING_ADVANCE_NO_UNIFY (c, dst); | 1551 | CHAR_STRING_ADVANCE_NO_UNIFY (c, dst); |
| 1552 | produced_chars++; | ||
| 1553 | } | 1552 | } |
| 1553 | produced_chars = dst - (coding->destination + coding->produced); | ||
| 1554 | } | 1554 | } |
| 1555 | record_conversion_result (coding, CODING_RESULT_SUCCESS); | 1555 | record_conversion_result (coding, CODING_RESULT_SUCCESS); |
| 1556 | coding->produced_char += produced_chars; | 1556 | coding->produced_char += produced_chars; |