[Python-checkins] CVS: python/dist/src/Python errors.c,2.42,2.43

Guido van Rossum guido@cnri.reston.va.us
Mon, 21 Feb 2000 11:50:33 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/projects/python/develop/guido/src/Python

Modified Files:
	errors.c 
Log Message:
Mark pointed out a buglet in his patch: i < _sys_nerr isn't strong
enough, it could be negative.  Add i > 0 test.  (Not i >= 0; zero isn't
a valid error number.)


Index: errors.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/errors.c,v
retrieving revision 2.42
retrieving revision 2.43
diff -C2 -r2.42 -r2.43
*** errors.c	2000/02/17 15:19:15	2.42
--- errors.c	2000/02/21 16:50:31	2.43
***************
*** 309,313 ****
  		   a Win32 error code
  		*/
! 		if (i < _sys_nerr) {
  			s = _sys_errlist[i];
  		}
--- 309,313 ----
  		   a Win32 error code
  		*/
! 		if (i > 0 && i < _sys_nerr) {
  			s = _sys_errlist[i];
  		}