]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix buglet in load_put -- the test for bad readline result tested the
authorGuido van Rossum <guido@python.org>
Mon, 8 Feb 1999 22:38:25 +0000 (22:38 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 8 Feb 1999 22:38:25 +0000 (22:38 +0000)
wrong variable.

Modules/cPickle.c

index e05f99b962b5fd5bc61773b02c9d8802699d00a3..3bf9ba112604605f378c8a86c577d9ff68e3964e 100644 (file)
@@ -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];