mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #3129: Trailing digits in format string are no longer ignored.
This commit is contained in:
parent
9b88b916a9
commit
177e8530cb
3 changed files with 36 additions and 3 deletions
|
@ -1195,8 +1195,11 @@ prepare_s(PyStructObject *self)
|
|||
}
|
||||
num = x;
|
||||
}
|
||||
if (c == '\0')
|
||||
break;
|
||||
if (c == '\0') {
|
||||
PyErr_SetString(StructError,
|
||||
"repeat count given without format specifier");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
num = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue