bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3552: 23.0.94; backward-prefix-chars: Point before start of properti


From: Noam Postavsky
Subject: bug#3552: 23.0.94; backward-prefix-chars: Point before start of properties
Date: Sat, 4 Jun 2016 11:22:23 -0400

On Sat, Jun 4, 2016 at 9:35 AM, Noam Postavsky
<npostavs@users.sourceforge.net> wrote:
> I propose the following patch be applied to the emacs-25 branch:

Sorry, that's not quite right, I didn't realize DEC_BOTH also reads
from the buffer, here is a patch that actually fixes the invalid read:

@@ -3109,8 +3109,10 @@ DEFUN ("backward-prefix-chars",
Fbackward_prefix_chars, Sbackward_prefix_chars,
       opoint = pos;
       opoint_byte = pos_byte;

-      if (pos + 1 > beg)
+      if (pos > beg)
     DEC_BOTH (pos, pos_byte);
+      else
+        break;
     }

   SET_PT_BOTH (opoint, opoint_byte);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]