Skip to content

Commit

Permalink
Improve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Iam-WenYi committed Aug 25, 2024
1 parent 843aed4 commit 30ce48a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pikiwidb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ bool PikiwiDB::ParseArgs(int argc, char* argv[]) {
{"slaveof", required_argument, 0, 's'},
};
// pikiwidb [/path/to/pikiwidb.conf] [options]
if (cfg_file_.empty() && ::access(argv[1], R_OK) == 0) {
if (cfg_file_.empty() && argc > 1 && ::access(argv[1], R_OK) == 0) {
cfg_file_ = argv[1];
argc = argc - 1;
argv = argv + 1;
Expand Down

0 comments on commit 30ce48a

Please sign in to comment.