# HG changeset patch # User Stefan Monnier # Date 1207252891 0 # Node ID f65c3e4b689b71c822f6925505b5e29c7ad79198 # Parent fbde6ee8b4289e485e1d0dbe404154af230bcf74 (insert_from_buffer_1): Don't compare bytes in destination buffer with byte-size of source buffer. diff -r fbde6ee8b428 -r f65c3e4b689b src/ChangeLog --- a/src/ChangeLog Thu Apr 03 16:37:39 2008 +0000 +++ b/src/ChangeLog Thu Apr 03 20:01:31 2008 +0000 @@ -1,3 +1,8 @@ +2008-04-03 Stefan Monnier + + * insdel.c (insert_from_buffer_1): Don't compare bytes in destination + buffer with byte-size of source buffer. + 2008-04-03 Chong Yidong * callint.c (Fcall_interactively): Handle temporary region even diff -r fbde6ee8b428 -r f65c3e4b689b src/insdel.c --- a/src/insdel.c Thu Apr 03 16:37:39 2008 +0000 +++ b/src/insdel.c Thu Apr 03 20:01:31 2008 +0000 @@ -1352,7 +1352,7 @@ /* 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;