From 7e79b8e08ddba0ad1080eb1edd6bad679be3b975 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 20 Apr 1998 07:08:40 +0000 Subject: [PATCH] (copy_text): Count down bytes_left properly in multibyte to unibyte case. --- src/insdel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2