summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-09-18 21:44:04 (GMT)
committerGuido van Rossum <guido@python.org>1995-09-18 21:44:04 (GMT)
commita1e7e6289301d981eff8357ed5b1f8ba95a9fc71 (patch)
tree89174a055490036bef918f7ad0849189cabf18da
parentbefa14f1b95bd0ad54b2db8b12eac56548436bab (diff)
downloadcpython-a1e7e6289301d981eff8357ed5b1f8ba95a9fc71.zip
cpython-a1e7e6289301d981eff8357ed5b1f8ba95a9fc71.tar.gz
cpython-a1e7e6289301d981eff8357ed5b1f8ba95a9fc71.tar.bz2
fix bug with missing default for last arg (discovered by Tommy Burnette)
-rw-r--r--Python/compile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 9f15254..a01e72a 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2139,8 +2139,9 @@ com_argdefs(c, n)
nargs++;
i++;
if (i >= nch)
- break;
- t = TYPE(CHILD(n, i));
+ t = RPAR; /* Anything except EQUAL or COMMA */
+ else
+ t = TYPE(CHILD(n, i));
if (t == EQUAL) {
i++;
ndefs++;