fix ouput redirection for 'print' command

This commit is contained in:
Holger Vogt 2018-11-06 19:06:01 +01:00
parent 9789956815
commit 7a1218cc0e
1 changed files with 4 additions and 2 deletions

View File

@ -1031,10 +1031,12 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
}
else if (ciprefix("print", buffer)) {
/* lower case excluded for tokens following output redirection '>' */
bool redir = FALSE;
for (s = buffer; *s && (*s != '\n'); s++) {
if (*s == '>')
break;
*s = tolower_c(*s);
redir = TRUE; /* do not lower, but move to end of string */
if (!redir)
*s = tolower_c(*s);
}
}
else {