diff src/fns.c @ 23579:3d1bb0100afb

(Fbase64_encode_region): Use SET_PT_BOTH instead of SET_PT when we have both char and byte position. Fix type clashes.
author Andreas Schwab <schwab@suse.de>
date Fri, 30 Oct 1998 10:20:25 +0000
parents 1a67e5327a04
children e8bf0c9f869d
line wrap: on
line diff
--- a/src/fns.c	Fri Oct 30 10:14:50 1998 +0000
+++ b/src/fns.c	Fri Oct 30 10:20:25 1998 +0000
@@ -2839,7 +2839,7 @@
 
   /* 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 @@
      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. */