]> git.eshelyaron.com Git - emacs.git/commitdiff
(copy_text): Count down bytes_left properly
authorRichard M. Stallman <rms@gnu.org>
Mon, 20 Apr 1998 07:08:40 +0000 (07:08 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 20 Apr 1998 07:08:40 +0000 (07:08 +0000)
in multibyte to unibyte case.

src/insdel.c

index 39c76d03dfed2421c326592977ce41e0b6379c9a..030b87385bdafb35a393368b36bcdb53009d4587 100644 (file)
@@ -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;