From d9ebc322c1d5e52352a20dbb3acf303f2644b8d3 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 12 Nov 1999 15:32:43 +0000 Subject: [PATCH] (xyzprintf): try to do the right thing with an % at the end of the format string git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7349 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/snprintf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/roken/snprintf.c b/lib/roken/snprintf.c index db73ddc9f..3b6956024 100644 --- a/lib/roken/snprintf.c +++ b/lib/roken/snprintf.c @@ -435,6 +435,9 @@ xyzprintf (struct state *state, const char *char_format, va_list ap) *arg = state->s - state->str; break; } + case '\0' : + --format; + /* FALLTHROUGH */ case '%' : if ((*state->append_char)(state, c)) return -1;