diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index f53d7cb88..b092cd4d6 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -89,8 +89,10 @@ struct pnode* ft_getpnames_quotes(wordlist* wl, bool check) DS_CREATE(dsquote, 100); /* only the quoted strings*/ /* put double quotes around tokens which start with math or number chars */ while (*tmpstr != '\0') { - /*check if we have v(something) at the beginning after arithchar or space */ - if ((tmpstr[0] == 'v' || tmpstr[0] == 'V') && tmpstr[1] == '(' && (nsz == tmpstr || isspace_c(tmpstr[-1]) || is_arith_char(tmpstr[-1]) || tmpstr[-1] == '.')) { + /*check if we have v(something) at the beginning after arithchar or space, + skip V(" (already quoted) */ + if ((tmpstr[0] == 'v' || tmpstr[0] == 'V') && tmpstr[1] == '(' && !tmpstr[2] == '\"' && + (nsz == tmpstr || isspace_c(tmpstr[-1]) || is_arith_char(tmpstr[-1]) || tmpstr[-1] == '.')) { char* tmpstr2, * partoken2 = NULL; tmpstr += 2; /* get the complete zzz of v(zzz) */