]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fbase64_encode_region): Use SET_PT_BOTH instead of SET_PT
authorAndreas Schwab <schwab@suse.de>
Fri, 30 Oct 1998 10:20:25 +0000 (10:20 +0000)
committerAndreas Schwab <schwab@suse.de>
Fri, 30 Oct 1998 10:20:25 +0000 (10:20 +0000)
when we have both char and byte position.  Fix type clashes.

src/fns.c

index 22c9ac41d1fc7f6e00820536b2e7c31fba750131..c60303acec62af96ecc05f39e4153c0cf0ee207d 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -2839,7 +2839,7 @@ into shorter lines.")
 
   /* Now we have encoded the region, so we insert the new contents
      and delete the old.  (Insert first in order to preserve markers.)  */
-  SET_PT (beg);
+  SET_PT_BOTH (XFASTINT (beg), ibeg);
   insert (encoded, encoded_length);
   del_range_byte (ibeg + encoded_length, iend + encoded_length, 1);
 
@@ -2847,8 +2847,8 @@ into shorter lines.")
      move to the beginning of the region.  */
   if (old_pos >= XFASTINT (end))
     old_pos += encoded_length - (XFASTINT (end) - XFASTINT (beg));
-  else if (old_pos > beg)
-    old_pos = beg;
+  else if (old_pos > XFASTINT (beg))
+    old_pos = XFASTINT (beg);
   SET_PT (old_pos);
 
   /* We return the length of the encoded text. */