mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
Prevent "print -m" from crashing (complains about missing pattern).
This commit is contained in:
parent
1e57c42f47
commit
ca8ad2e262
1 changed files with 5 additions and 1 deletions
|
@ -3111,7 +3111,11 @@ bin_print(char *name, char **args, Options ops, int func)
|
|||
if (OPT_ISSET(ops,'m')) {
|
||||
Patprog pprog;
|
||||
char **t, **p;
|
||||
|
||||
|
||||
if (!*args) {
|
||||
zwarnnam(name, "no pattern specified", NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
tokenize(*args);
|
||||
if (!(pprog = patcompile(*args, PAT_STATIC, NULL))) {
|
||||
untokenize(*args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue