diff options
author | Marco Paland <marco@paland.com> | 2018-09-24 15:12:00 +0200 |
---|---|---|
committer | Marco Paland <marco@paland.com> | 2018-09-24 15:12:00 +0200 |
commit | 25958b9beb1830eb79033d6095a64f4c5f87effa (patch) | |
tree | c534a2c9155d1d599a339fb1eb165f1d5abd3473 | |
parent | c235b5cd6eb541f87de4ff76487ca39c20153f5b (diff) | |
download | printf-25958b9beb1830eb79033d6095a64f4c5f87effa.tar.gz printf-25958b9beb1830eb79033d6095a64f4c5f87effa.tar.bz2 printf-25958b9beb1830eb79033d6095a64f4c5f87effa.zip |
fix(printf): fix hash precision
Fixes #31
-rw-r--r-- | printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -163,7 +163,7 @@ static size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t ma // handle hash
if (flags & FLAGS_HASH) {
- if (len && ((len == prec) || (len == width))) {
+ if (!(flags & FLAGS_PRECISION) && len && ((len == prec) || (len == width))) {
len--;
if (len && (base == 16U)) {
len--;
|