Fix buglet in load_put -- the test for bad readline result tested the
wrong variable.
This commit is contained in:
parent
c54367a2f0
commit
d1f66dc198
|
@ -3087,7 +3087,7 @@ load_put(Unpicklerobject *self) {
|
|||
char *s;
|
||||
|
||||
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 (py_str = PyString_FromStringAndSize(s, l - 1)) return -1;
|
||||
value=self->stack->data[len-1];
|
||||
|
|
Loading…
Reference in New Issue