From d1f66dc198a003b182e846ff65b04af8cc94e3b7 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 8 Feb 1999 22:38:25 +0000 Subject: Fix buglet in load_put -- the test for bad readline result tested the wrong variable. --- Modules/cPickle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/cPickle.c b/Modules/cPickle.c index e05f99b..3bf9ba1 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -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]; -- cgit v0.12