Commit 42885206 authored by Victor Stinner's avatar Victor Stinner

UTF-8 decoder: set consumed value in the latin1 fast-path

parent d3df8ab3
......@@ -4391,6 +4391,9 @@ PyUnicode_DecodeUTF8Stateful(const char *s,
unicode_size may be != size if there is an incomplete UTF-8
sequence at the end of the ASCII block. */
if (maxchar < 128 && size == unicode_size) {
if (consumed)
*consumed = size;
if (size == 1)
return get_latin1_char((unsigned char)s[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment