From cc46c359f67b00b4d0260f41c16a70445554fb60 Mon Sep 17 00:00:00 2001
From: Armin Luntzer <armin.luntzer@univie.ac.at>
Date: Tue, 12 Nov 2019 15:54:02 +0100
Subject: [PATCH] vsnprintf(): do not increment buffer pointer when rendering
 any format 	     specifiers, as the pointer is already incremented in 
      _sprintc()

---
 lib/vsnprintf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c
index 2d68c50..618639d 100644
--- a/lib/vsnprintf.c
+++ b/lib/vsnprintf.c
@@ -1297,9 +1297,9 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap)
 
 		/* and render */
 		if (!str) /* to stdout? */
-			buf += render_specifier(NULL, NULL, format, &spec, &ap);
+			render_specifier(NULL, NULL, format, &spec, &ap);
 		else
-			buf += render_specifier(&buf, end, format, &spec, &ap);
+			render_specifier(&buf, end, format, &spec, &ap);
 
 		format++; /* the type is always a single char */
 	}
-- 
GitLab