From: Kenichi Handa Date: Tue, 7 May 2002 04:49:50 +0000 (+0000) Subject: (Fset_buffer_multibyte): Fix 8-bit char handling. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~929 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31285a8f59900b0e80120448384e4f12312212cc;p=emacs.git (Fset_buffer_multibyte): Fix 8-bit char handling. --- diff --git a/src/buffer.c b/src/buffer.c index 87075e03372..fd53972d6b1 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2089,7 +2089,7 @@ but the contents viewed as characters do change. */) p++, pos++; else if (CHAR_BYTE8_HEAD_P (*p)) { - c = STRING_CHAR (p, stop - pos); + c = STRING_CHAR_AND_LENGTH (p, stop - pos, bytes); /* Delete all bytes for this 8-bit character but the last one, and change the last one to the charcter code. */ @@ -2176,6 +2176,7 @@ but the contents viewed as characters do change. */) zv += bytes; if (pos <= pt) pt += bytes; + pend = Z_ADDR; stop = Z; } }