handle # comment in quotes
This commit is contained in:
parent
d96b46c7a4
commit
29507bc2b9
|
@ -1556,6 +1556,15 @@ static int r_core_cmd_subst(RCore *core, char *cmd) {
|
|||
goto beach;
|
||||
}
|
||||
cmt = *icmd ? strchr (icmd + 1, '#'): NULL;
|
||||
if (cmt) {
|
||||
// must honor "
|
||||
char *ch;
|
||||
ut32 cnt = 0;
|
||||
for (ch = icmd + 1; ch < cmt; ++ch) {
|
||||
if (*ch == '"') ++cnt;
|
||||
}
|
||||
if (cnt == 0 || (cnt % 2)) cmt = NULL;
|
||||
}
|
||||
if (cmt && (cmt[1] == ' ' || cmt[1] == '\t')) {
|
||||
*cmt = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue