summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-02-08 22:38:25 (GMT)
committerGuido van Rossum <guido@python.org>1999-02-08 22:38:25 (GMT)
commitd1f66dc198a003b182e846ff65b04af8cc94e3b7 (patch)
treeb3a65ca19521f97a76e40f12dcf51540817273a9 /Modules/cPickle.c
parentc54367a2f079e144f8e3eb32f372687086de839d (diff)
downloadcpython-d1f66dc198a003b182e846ff65b04af8cc94e3b7.zip
cpython-d1f66dc198a003b182e846ff65b04af8cc94e3b7.tar.gz
cpython-d1f66dc198a003b182e846ff65b04af8cc94e3b7.tar.bz2
Fix buglet in load_put -- the test for bad readline result tested the
wrong variable.
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c2
1 files changed, 1 insertions, 1 deletions
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];