From 7f4d2215e2b13d1f6bcbae4327cadd25fd014829 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 1 Apr 2020 18:32:30 +0900 Subject: [PATCH] [gamecode] Accept EOS at end of conversion specifier --- libs/gamecode/pr_strings.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/gamecode/pr_strings.c b/libs/gamecode/pr_strings.c index 31c387575..195dd5980 100644 --- a/libs/gamecode/pr_strings.c +++ b/libs/gamecode/pr_strings.c @@ -1073,7 +1073,11 @@ fmt_state_conversion (fmt_state_t *state) fmt_append_item (state); break; } - state->state = fmt_state_format; + if (*state->c) { + state->state = fmt_state_format; + } else { + state->state = 0; // finished + } } static void