aboutsummaryrefslogtreecommitdiff
path: root/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzip.c')
-rw-r--r--gzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gzip.c b/gzip.c
index cdf226889..54bb72745 100644
--- a/gzip.c
+++ b/gzip.c
@@ -1246,7 +1246,7 @@ int gzip_main(int argc, char **argv)
show_usage();
}
}
- if (optind == argc) {
+ if ((optind == argc) || (strcmp(argv[optind], "-") == 0)) {
fromstdin = 1;
tostdout = 1;
}