[Python-checkins] CVS: python/dist/src/Modules pypcre.c,2.21,2.22
A.M. Kuchling
python-dev@python.org
Wed, 2 Aug 2000 06:41:21 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14555
Modified Files:
pypcre.c
Log Message:
Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal
escape, as documented in the comment for the check_escape() function
Index: pypcre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pypcre.c,v
retrieving revision 2.21
retrieving revision 2.22
diff -C2 -r2.21 -r2.22
*** pypcre.c 2000/07/31 15:28:04 2.21
--- pypcre.c 2000/08/02 13:41:18 2.22
***************
*** 1033,1037 ****
{
if (( pcre_ctypes[ ptr[i] ] & ctype_odigit) != 0)
! c = c * 8 + ptr[i]-'0';
else
break; /* Non-octal character--break out of the loop */
--- 1033,1037 ----
{
if (( pcre_ctypes[ ptr[i] ] & ctype_odigit) != 0)
! c = (c * 8 + ptr[i]-'0') & 255;
else
break; /* Non-octal character--break out of the loop */