mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 17:20:25 +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
|
|
@ -3112,6 +3112,10 @@ bin_print(char *name, char **args, Options ops, int func)
|
|||
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