Mercurial > emacs
diff src/coding.c @ 95344:02f76f79f115
(encode_coding_raw_text): Set coding->produced_char for all branches.
Compute it differently.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Tue, 27 May 2008 15:49:49 +0000 |
| parents | 524350e4961c |
| children | 0350e5efb8f7 |
line wrap: on
line diff
--- a/src/coding.c Tue May 27 14:12:42 2008 +0000 +++ b/src/coding.c Tue May 27 15:49:49 2008 +0000 @@ -4818,7 +4818,6 @@ int *charbuf_end = coding->charbuf + coding->charbuf_used; unsigned char *dst = coding->destination + coding->produced; unsigned char *dst_end = coding->destination + coding->dst_bytes; - int produced_chars = 0; int c; if (multibytep) @@ -4873,7 +4872,6 @@ *dst++ = CHAR_TO_BYTE8 (c); else CHAR_STRING_ADVANCE (c, dst); - produced_chars++; } } else @@ -4881,11 +4879,10 @@ ASSURE_DESTINATION (charbuf_end - charbuf); while (charbuf < charbuf_end && dst < dst_end) *dst++ = *charbuf++; - produced_chars = dst - (coding->destination + coding->dst_bytes); } } record_conversion_result (coding, CODING_RESULT_SUCCESS); - coding->produced_char += produced_chars; + coding->produced_char += charbuf - coding->charbuf; coding->produced = dst - coding->destination; return 0; }
