1
0
Fork 0
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:
Wayne Davison 2003-03-28 20:21:00 +00:00
parent 1e57c42f47
commit ca8ad2e262

View file

@ -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);