Kaydet (Commit) d1f66dc1 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix buglet in load_put -- the test for bad readline result tested the

wrong variable.
üst c54367a2
...@@ -3087,7 +3087,7 @@ load_put(Unpicklerobject *self) { ...@@ -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];
......
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