commit | 177e8530cbf5ece4264d48da3c11a7e1fc45dcb4 | [log] [tgz] |
---|---|---|
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Fri Jun 11 16:04:59 2010 +0000 |
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | Fri Jun 11 16:04:59 2010 +0000 |
tree | 3c0fa69fff00f24eb799f7cfad03669e73d7bf7f | |
parent | 9b88b916a903d97e3125b4436ac5c14620a78238 [diff] |
Issue #3129: Trailing digits in format string are no longer ignored.
diff --git a/Modules/_struct.c b/Modules/_struct.c index 26179cc..2e594e8 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c
@@ -1195,8 +1195,11 @@ } num = x; } - if (c == '\0') - break; + if (c == '\0') { + PyErr_SetString(StructError, + "repeat count given without format specifier"); + return -1; + } } else num = 1;