From b40e586ef30a6afbf67c2cbc9ea71fd04b948ba0 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 31 May 2018 15:30:19 -0700 Subject: [PATCH] SCP: Assure that action commands (IF/ASSERT,BREAK, ON, etc.) are trimmed --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index c37c1f56..098fbb8e 100644 --- a/scp.c +++ b/scp.c @@ -11100,7 +11100,6 @@ if ((ep != NULL) && (*ep != ';')) { /* if a quoted string is ep = ep + 1; /* skip the non-quote character */ ep = strchr (ep, ';'); /* the next semicolon is outside the quotes if it exists */ } - if (ep != NULL) { /* if a semicolon is present */ lnt = ep - sim_brk_act[sim_do_depth]; /* cmd length */ memcpy (buf, sim_brk_act[sim_do_depth], lnt + 1); /* copy with ; */ @@ -11111,6 +11110,7 @@ else { strlcpy (buf, sim_brk_act[sim_do_depth], size); /* copy action */ sim_brk_clract (); /* no more */ } +sim_trim_endspc (buf); return buf; }