diff options
-rw-r--r-- | src/memview.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memview.c b/src/memview.c index 21d7c49..39ee94b 100644 --- a/src/memview.c +++ b/src/memview.c @@ -603,7 +603,7 @@ main(int argc, char *argv[]) FILE *regions_file = NULL; if (argc > 2 && !(regions_file = fopen(argv[2], "rb"))) { err(EXIT_FAILURE, "fopen(%s)", argv[2]); - } else { + } else if (argc == 2) { char path[128]; snprintf(path, sizeof(path), "/proc/%u/maps", pid); if (!(regions_file = fopen(path, "rb"))) |