[pypy-svn] r57618 - pypy/dist/pypy/translator/jvm/src/pypy
antocuni at codespeak.net
antocuni at codespeak.net
Mon Aug 25 10:39:27 CEST 2008
Author: antocuni
Date: Mon Aug 25 10:39:23 2008
New Revision: 57618
Modified:
pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java
Log:
fix rfind
Modified: pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java
==============================================================================
--- pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java (original)
+++ pypy/dist/pypy/translator/jvm/src/pypy/PyPy.java Mon Aug 25 10:39:23 2008
@@ -672,6 +672,9 @@
public static int ll_rfind(String haystack, String needle,
int start, int end) {
+ if (start > haystack.length())
+ return -1;
+
haystack = substring(haystack, start, end);
int res = haystack.lastIndexOf(needle);
if (res == -1) return res;
More information about the Pypy-commit
mailing list