aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/printf.c b/printf.c
index 93a2f0f..9905032 100644
--- a/printf.c
+++ b/printf.c
@@ -649,7 +649,7 @@ static int _vsnprintf(out_fct_type out, char* buffer, const size_t maxlen, const
case 's' : {
char* p = va_arg(va, char*);
- unsigned int l = _strlen(p);
+ unsigned int l = _strlen(p, precision);
// pre padding
if (flags & FLAGS_PRECISION) {
l = (l < precision ? l : precision);