From 032bbf6f24efd1b69141e08c610974921ca23e78 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Sat, 24 Oct 2020 03:11:37 +0200 Subject: [PATCH] fixed error in tripping off "eval(...)" wrapper from string in print_spice_element --- src/token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.c b/src/token.c index bdb27ac1..f86e2d0c 100644 --- a/src/token.c +++ b/src/token.c @@ -1658,7 +1658,7 @@ void print_spice_element(FILE *fd, int inst) } /* do a second round of substitutions, but without calling tcl */ if(result && strstr(result, "eval(") == result) { - result[strlen(result)-1] = '\0'; + strrchr(result, ')')[0]= '\0'; my_strdup2(88, &result, translate(inst, result+5)); } fprintf(fd, "%s", result);