py/objstrunicode: str_index_to_ptr: Should handle bytes too.
There's single str_index_to_ptr() function, called for both bytes and unicode objects, so should handle each properly.
This commit is contained in:
@@ -21,3 +21,6 @@ print(b"0000".find(b'-1', 3))
|
||||
print(b"0000".find(b'1', 3))
|
||||
print(b"0000".find(b'1', 4))
|
||||
print(b"0000".find(b'1', 5))
|
||||
|
||||
# Non-ascii values (make sure not treated as unicode-like)
|
||||
print(b"\x80abc".find(b"a", 1))
|
||||
|
||||
Reference in New Issue
Block a user