From d0ca6a4773b6f7a95e10b33944ddb1a09bc6eb65 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 18 Jun 2021 16:18:40 +0200 Subject: [PATCH] Start replacing identifiers by func only after the first '=' --- src/frontend/inpcom.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 8da8ceb44..c4bfc4cd5 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -863,6 +863,7 @@ struct card *inp_readall(FILE *fp, const char *dir_name, int ii; for (ii = 0; ii < 5; ii++) inp_fix_agauss_in_param(working, statfcn[ii]); + inp_fix_temper_in_param(working); inp_expand_macros_in_deck(NULL, working); @@ -7109,7 +7110,10 @@ static char *inp_functionalise_identifier(char *curr_line, char *identifier) size_t len = strlen(identifier); char *p, *str = curr_line; - for (p = str; (p = search_identifier(p, identifier, str)) != NULL;) + /* Start replacing identifier by func only after the first '=' */ + char* estr = strchr(curr_line, '='); + + for (p = estr; (p = search_identifier(p, identifier, str)) != NULL;) if (p[len] != '(') { int prefix_len = (int) (p + len - str); char *x = str;