Fix #1565 - mg_snprintf %.*s with zero len printing

This commit is contained in:
Sergey Lyubka
2022-05-30 18:40:44 +01:00
parent b8bba7513a
commit e2fcf5f92c
3 changed files with 7 additions and 4 deletions
+1
View File
@@ -1329,6 +1329,7 @@ static void test_str(void) {
ASSERT(sn("%d", 0));
ASSERT(sn("%d", 1));
ASSERT(sn("%d", -1));
ASSERT(sn("%.*s", 0, "ab"));
ASSERT(sn("%.*s", 1, "ab"));
ASSERT(sn("%.1s", "ab"));
ASSERT(sn("%.99s", "a"));