From 68701e51c1f794df59d9f70bcddbf714ee91b868 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Wed, 9 Mar 2016 02:59:05 -0500 Subject: mprintf: Fix processing of width and prec args Prior to this change a width arg could be erroneously output, and also width and precision args could not be used together without crashing. "%0*d%s", 2, 9, "foo" Before: "092" After: "09foo" "%*.*s", 5, 2, "foo" Before: crash After: " fo" Test 557 is updated to verify this and more --- tests/data/test557 | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/data/test557') diff --git a/tests/data/test557 b/tests/data/test557 index ee2793f56..8d0944a1e 100644 --- a/tests/data/test557 +++ b/tests/data/test557 @@ -39,6 +39,7 @@ All curl_mprintf() signed int tests OK! All curl_mprintf() unsigned long tests OK! All curl_mprintf() signed long tests OK! All curl_mprintf() curl_off_t tests OK! +All curl_mprintf() strings tests OK! -- cgit v1.2.3