diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-03 20:56:27 +0100 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-03 20:56:27 +0100 |
| commit | 3575597ccfa3f7a6cca57ee738198c4047a4cfce (patch) | |
| tree | e35bbd931fa375177c19333dfeae9f74481479a3 /Python/formatter_unicode.c | |
| parent | ae0f016ce4eb72a3c4f18bb82a3f2fc9ae952dfa (diff) | |
| parent | b8547bd979ebb8ce16b64c4cf0fdf1e3d59f965a (diff) | |
| download | cpython-3575597ccfa3f7a6cca57ee738198c4047a4cfce.tar.gz | |
Split the bigmem re test in two separate tests with different memory requirements.
Diffstat (limited to 'Python/formatter_unicode.c')
| -rw-r--r-- | Python/formatter_unicode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index aa62502dbe..0ce9862a20 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -757,7 +757,8 @@ format_string_internal(PyObject *value, const InternalFormatSpec *format, goto done; } - if (format->width == -1 && format->precision == -1) { + if ((format->width == -1 || format->width <= len) + && (format->precision == -1 || format->precision >= len)) { /* Fast path */ return _PyUnicodeWriter_WriteStr(writer, value); } |
