Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95231:8c089ffd30f2
Date: 2018-10-22 08:49 +0300
http://bitbucket.org/pypy/pypy/changeset/8c089ffd30f2/

Log:    off-by-one error

diff --git a/pypy/objspace/std/unicodeobject.py 
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -1216,7 +1216,7 @@
             ru, pos = eh(errors, "utf8", "surrogates not allowed", utf8,
                 pos, pos + 1)
             upos = rutf8.next_codepoint_pos(utf8,pos)
-            end = utf8[upos+1:]
+            end = utf8[upos:]
             utf8 = start + ru + end
             w_object = space.newtext(utf8)
     if errors is None or errors == 'strict':
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to