diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-10-02 01:46:49 +0300 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-10-02 01:46:49 +0300 |
| commit | 2c5268124f1e3fcc86a813c2c09077912f3d38c4 (patch) | |
| tree | 4d561eb77d6e5d86261641ca6d5d04235d2c8c24 /Python | |
| parent | 89096f0ad9ff82c16fc6aacc032718f8dd733e79 (diff) | |
| parent | 9b7dd8a6114201295c5dce3a6cd3d48550a88056 (diff) | |
| download | cpython-2c5268124f1e3fcc86a813c2c09077912f3d38c4.tar.gz | |
Merge changelog filtering fixes/improvements with 3.3.
Diffstat (limited to 'Python')
| -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); } |
