changeset 4527:8418d1ad4944

Fix at_dot regex under Mule. <87hc6rv53v.fsf@uwakimon.sk.tsukuba.ac.jp>
author Stephen J. Turnbull <stephen@xemacs.org>
date Sun, 02 Nov 2008 00:34:13 +0900
parents 38493c0fb952
children 9b182263dbd7 4a7c4ccac2fe
files src/ChangeLog src/regex.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Nov 02 00:12:13 2008 +0900
+++ b/src/ChangeLog	Sun Nov 02 00:34:13 2008 +0900
@@ -1,3 +1,8 @@
+2008-11-01  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* regex.c (re_search_2): Fix at_dot by changing charpos to bytepos.
+	From Julian Bradfield <18654.1143.304851.782755@krk.inf.ed.ac.uk>.
+
 2008-11-01  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* mule-ccl.c (ccl_driver): Fix off-by-one error.
--- a/src/regex.c	Sun Nov 02 00:12:13 2008 +0900
+++ b/src/regex.c	Sun Nov 02 00:34:13 2008 +0900
@@ -4313,8 +4313,8 @@
     {
       if (!BUFFERP (lispobj))
 	return -1;
-      range = (BUF_PT (XBUFFER (lispobj)) - BUF_BEGV (XBUFFER (lispobj))
-	       - startpos);
+      range = (BYTE_BUF_PT (XBUFFER (lispobj))
+	       - BYTE_BUF_BEGV (XBUFFER (lispobj)) - startpos);
       if (range < 0)
 	return -1;
     }