From 11c57580b47c861aac511f76df3681053d42d3a7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 12 Mar 2022 15:57:14 +0200 Subject: [PATCH 36/36] req_text_insert(): Fix fallthrough from VUT_CITYSTATUS If given range is unsupported for VUT_CITYSTATUS, execution fell through. This was harmless in S3_1, as the following case is VUT_COUNT that immediately does the "break;" See osdn #44082 Signed-off-by: Marko Lindqvist --- common/reqtext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/reqtext.c b/common/reqtext.c index f25a16dde3..f5d6f22ff5 100644 --- a/common/reqtext.c +++ b/common/reqtext.c @@ -2806,9 +2806,7 @@ bool req_text_insert(char *buf, size_t bufsz, struct player *pplayer, } case VUT_CITYSTATUS: - if (preq->source.value.citystatus == CITYS_LAST) { - break; - } else { + if (preq->source.value.citystatus != CITYS_LAST) { static char *city_property = NULL; switch (preq->source.value.citystatus) { @@ -2858,6 +2856,7 @@ bool req_text_insert(char *buf, size_t bufsz, struct player *pplayer, break; } } + break; case VUT_COUNT: break; -- 2.35.1