From f93d24dcda56495bf25f35d31455897e00b0242b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 20 Aug 2002 17:29:29 +0000 Subject: Fix some endcase bugs in unicode rfind()/rindex() and endswith(). These were reported and fixed by Inyeol Lee in SF bug 595350. The endswith() bug was already fixed in 2.3, but this adds some more test cases. --- Objects/stringobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/stringobject.c') diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 7a48627324..9f41317546 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1536,7 +1536,7 @@ string_find_internal(PyStringObject *self, PyObject *args, int dir) } #ifdef Py_USING_UNICODE else if (PyUnicode_Check(subobj)) - return PyUnicode_Find((PyObject *)self, subobj, i, last, 1); + return PyUnicode_Find((PyObject *)self, subobj, i, last, dir); #endif else if (PyObject_AsCharBuffer(subobj, &sub, &n)) return -2; -- cgit v1.2.1