changeset 95345:0350e5efb8f7

(encode_coding_raw_text): Fix last change.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 27 May 2008 15:56:59 +0000
parents 02f76f79f115
children 29a62a8c830b
files src/coding.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Tue May 27 15:49:49 2008 +0000
+++ b/src/coding.c	Tue May 27 15:56:59 2008 +0000
@@ -4818,6 +4818,7 @@
   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)
@@ -4880,9 +4881,10 @@
 	  while (charbuf < charbuf_end && dst < dst_end)
 	    *dst++ = *charbuf++;
 	}
+      produced_chars = charbuf - coding->charbuf;
     }
   record_conversion_result (coding, CODING_RESULT_SUCCESS);
-  coding->produced_char += charbuf - coding->charbuf;
+  coding->produced_char += produced_chars;
   coding->produced = dst - coding->destination;
   return 0;
 }