From 9e575a1d883b101c5d134e6a7cd22bc88a1e3fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Gl=C3=A4=C3=9Fle?= Date: Tue, 6 Mar 2018 23:46:39 +0100 Subject: [PATCH] Fix parsing negated logical after string parameter Fixes parsing expressions such as: beam, sequence=s1, -radiate; which was so far parsed as: beam, sequence="s1,-", radiate; Example: s1: sequence, l=1; endsequence; beam, sequence=s1, -radiate; use, sequence=s1; Results in: +=+=+= fatal: USE - sequence without beam: sequ --- src/mad_cmdpar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mad_cmdpar.c b/src/mad_cmdpar.c index 489b917c3..b9351ba29 100644 --- a/src/mad_cmdpar.c +++ b/src/mad_cmdpar.c @@ -857,7 +857,7 @@ decode_par(struct in_cmd* cmd, int start, int number, int pos, int log) for (j = i; j < number; j++) if (name_list_pos(alias(toks[j]), cmd->cmd_def->par_names) >= 0) break; // dirty quick fix for ticket #165 -// if (*toks[j-1] == ',') j--; + if (*toks[j-1] == '-') j--; while (*toks[j-1] == ',') j--; tot_end = j - 1; clp->string = permbuff(noquote(join(&toks[i], j - i)));