From: Richard M. Stallman Date: Mon, 20 Apr 1998 07:08:40 +0000 (+0000) Subject: (copy_text): Count down bytes_left properly X-Git-Tag: emacs-20.3~1400 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e79b8e08ddba0ad1080eb1edd6bad679be3b975;p=emacs.git (copy_text): Count down bytes_left properly in multibyte to unibyte case. --- diff --git a/src/insdel.c b/src/insdel.c index 39c76d03dfe..030b87385bd 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -707,7 +707,7 @@ copy_text (from_addr, to_addr, nbytes, c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen); *to_addr++ = SINGLE_BYTE_CHAR_P (c) ? c : (c & 0177) + 0200; from_addr += thislen; - bytes_left--; + bytes_left -= thislen; nchars++; } return nchars;