From e2c5b5e5e5791212c626c3947c41de5b5b7ac9b8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 14 Feb 2023 06:37:08 +0200 Subject: [PATCH 42/42] valid_advance(): Consider Future techs valid ones See osdn #46544 Signed-off-by: Marko Lindqvist --- common/tech.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/common/tech.c b/common/tech.c index 9f1a8b7c7b..d1bea7dd9a 100644 --- a/common/tech.c +++ b/common/tech.c @@ -151,8 +151,15 @@ struct advance *advance_requires(const struct advance *padvance, **************************************************************************/ struct advance *valid_advance(struct advance *padvance) { - if (NULL == padvance - || A_NEVER == padvance->require[AR_ONE] + if (padvance == NULL) { + return NULL; + } + + if (padvance->item_number == A_FUTURE) { + return padvance; + } + + if (A_NEVER == padvance->require[AR_ONE] || A_NEVER == padvance->require[AR_TWO]) { return NULL; } -- 2.39.1