mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Fix buglet in load_put -- the test for bad readline result tested the
wrong variable.
This commit is contained in:
parent
c54367a2f0
commit
d1f66dc198
1 changed files with 1 additions and 1 deletions
|
@ -3087,7 +3087,7 @@ load_put(Unpicklerobject *self) {
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
if ((l = (*self->readline_func)(self, &s)) < 0) return -1;
|
if ((l = (*self->readline_func)(self, &s)) < 0) return -1;
|
||||||
if (len < 2) return bad_readline();
|
if (l < 2) return bad_readline();
|
||||||
UNLESS (len=self->stack->length) return stackUnderflow();
|
UNLESS (len=self->stack->length) return stackUnderflow();
|
||||||
UNLESS (py_str = PyString_FromStringAndSize(s, l - 1)) return -1;
|
UNLESS (py_str = PyString_FromStringAndSize(s, l - 1)) return -1;
|
||||||
value=self->stack->data[len-1];
|
value=self->stack->data[len-1];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue