[Python-checkins] CVS: python/dist/src/Modules pypcre.c,2.17,2.18

A.M. Kuchling python-dev@python.org
2000年5月31日 20:02:50 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4871
Modified Files:
	pypcre.c 
Log Message:
Fix bug reported by atkins@gweep.net; re.compile(r"[100円-410円]") 
 dumps core. Solution: fix check_escape() to match its comment and
 use only the low 8 bits of the octal number.
Index: pypcre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v
retrieving revision 2.17
retrieving revision 2.18
diff -C2 -r2.17 -r2.18
*** pypcre.c	2000年02月18日 19:16:45	2.17
--- pypcre.c	2000年06月01日 03:02:48	2.18
***************
*** 1065,1069 ****
 while(i++ < 2 && (pcre_ctypes[ptr[1]] & ctype_digit) != 0 &&
 ptr[1] != '8' && ptr[1] != '9')
! c = c * 8 + *(++ptr) - '0';
 break;
 
--- 1065,1069 ----
 while(i++ < 2 && (pcre_ctypes[ptr[1]] & ctype_digit) != 0 &&
 ptr[1] != '8' && ptr[1] != '9')
! c = (c * 8 + *(++ptr) - '0') & 255;
 break;
 

AltStyle によって変換されたページ (->オリジナル) /