(insert_from_buffer_1): Don't compare bytes in destination
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2008 20:01:31 +0000 (20:01 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2008 20:01:31 +0000 (20:01 +0000)
buffer with byte-size of source buffer.

src/ChangeLog
src/insdel.c

index 2093bb6..5ae4fc6 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * insdel.c (insert_from_buffer_1): Don't compare bytes in destination
+       buffer with byte-size of source buffer.
+
 2008-04-03  Chong Yidong  <cyd@stupidchicken.com>
 
        * callint.c (Fcall_interactively): Handle temporary region even
index 2919c18..884620d 100644 (file)
@@ -1352,7 +1352,7 @@ insert_from_buffer_1 (buf, from, nchars, inherit)
 
   /* Get the intervals for the part of the string we are inserting.  */
   intervals = BUF_INTERVALS (buf);
-  if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf))
+  if (nchars < BUF_Z (buf) - BUF_BEG (buf))
     {
       if (buf == current_buffer && PT <= from)
        from += nchars;