1
0
mirror of https://github.com/tmux/tmux.git synced 2024-12-14 19:18:48 +00:00

Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2019-05-31 15:02:27 +01:00
commit adf9e77702
2 changed files with 7 additions and 4 deletions

View File

@ -998,11 +998,15 @@ yylex(void)
if (ch == '%') {
/*
* % is a condition unless it is alone, then it is a
* token.
* % is a condition unless it is all % or all numbers,
* then it is a token.
*/
yylval.token = yylex_get_word('%');
if (strcmp(yylval.token, "%") == 0)
for (cp = yylval.token; *cp != '\0'; cp++) {
if (*cp != '%' && !isdigit((u_char)*cp))
break;
}
if (*cp == '\0')
return (TOKEN);
if (strcmp(yylval.token, "%if") == 0) {
free(yylval.token);

View File

@ -91,7 +91,6 @@ control_callback(struct client *c, int closed, __unused void *data)
case CMD_PARSE_ERROR:
item = cmdq_get_callback(control_error, pr->error);
cmdq_append(c, item);
free(pr->error);
break;
case CMD_PARSE_SUCCESS:
item = cmdq_get_command(pr->cmdlist, NULL, NULL, 0);