summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-10-02 01:46:49 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2012-10-02 01:46:49 +0300
commit2c5268124f1e3fcc86a813c2c09077912f3d38c4 (patch)
tree4d561eb77d6e5d86261641ca6d5d04235d2c8c24 /Python
parent89096f0ad9ff82c16fc6aacc032718f8dd733e79 (diff)
parent9b7dd8a6114201295c5dce3a6cd3d48550a88056 (diff)
downloadcpython-2c5268124f1e3fcc86a813c2c09077912f3d38c4.tar.gz
Merge changelog filtering fixes/improvements with 3.3.
Diffstat (limited to 'Python')
-rw-r--r--Python/formatter_unicode.c3
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);
}