[Python-checkins] python/dist/src/Objects complexobject.c,2.56,2.57

tim_one@sourceforge.net tim_one@sourceforge.net
Sun, 14 Apr 2002 15:04:05 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv28911/python/Objects

Modified Files:
	complexobject.c 
Log Message:
SF bug 543840: complex(string) accepts strings with \0
complex_subtype_from_string():  this stopped parsing at the first 0
byte, as if that were the end of the input string.

Bugfix candidate.


Index: complexobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
retrieving revision 2.56
retrieving revision 2.57
diff -C2 -d -r2.56 -r2.57
*** complexobject.c	12 Apr 2002 02:41:32 -0000	2.56
--- complexobject.c	14 Apr 2002 22:04:03 -0000	2.57
***************
*** 788,792 ****
  		}  /* end of switch  */
  
! 	} while (*s!='\0' && !sw_error);
  
  	if (sw_error) {
--- 788,792 ----
  		}  /* end of switch  */
  
! 	} while (s - start < len && !sw_error);
  
  	if (sw_error) {