|
From: Finn B. <bc...@us...> - 2000-12-04 21:47:24
|
Update of /cvsroot/jython/jython/org/python/core In directory slayer.i.sourceforge.net:/tmp/cvs-serv24628 Modified Files: PyString.java Log Message: atoi(): Fixed StringIndexOutOfBoundsException when doing int("0", 16) Index: PyString.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyString.java,v retrieving revision 2.29 retrieving revision 2.30 diff -C2 -r2.29 -r2.30 *** PyString.java 2000/12/04 21:23:06 2.29 --- PyString.java 2000/12/04 21:47:21 2.30 *************** *** 1166,1170 **** if (base == 0 || base == 16) { if (string.charAt(b) == '0') { ! if (string.charAt(b+1) == 'x') { if (base == 0) base = 16; --- 1166,1170 ---- if (base == 0 || base == 16) { if (string.charAt(b) == '0') { ! if (b < e-1 && string.charAt(b+1) == 'x') { if (base == 0) base = 16; |