Issue #3129: Trailing digits in format string are no longer ignored.

This commit is contained in:
Alexander Belopolsky 2010-06-11 16:04:59 +00:00
parent 9b88b916a9
commit 177e8530cb
3 changed files with 36 additions and 3 deletions

View file

@ -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;