summaryrefslogtreecommitdiff
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-20 17:29:29 +0000
committerGuido van Rossum <guido@python.org>2002-08-20 17:29:29 +0000
commit76afbd9aa41bf34f488a7a1e759622c7f1830cff (patch)
treee4fb84ab073d0da8a668381b45dae2cb96c92c6a /Objects/stringobject.c
parentc230b0e1f92bdc54318d58a07859bfcd7b03979a (diff)
downloadcpython-git-76afbd9aa41bf34f488a7a1e759622c7f1830cff.tar.gz
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.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c2
1 files changed, 1 insertions, 1 deletions
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;