summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-05-28 03:09:52 +0800
committerKeuin <[email protected]>2022-05-28 03:09:52 +0800
commite67bab4e6a220b27b87ca56829d39dc8b20a24b4 (patch)
treeb6d7a9696ea3fd649cde47658dbd9dfefa34e517
parentf3baf01fd8dcf6bdfe2ee558088ad89907f7bd6c (diff)
Bugfix: image file will be saved as '-j' by accident.
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 7ac4eb4..e94818c 100644
--- a/main.c
+++ b/main.c
@@ -253,7 +253,8 @@ int main(int argc, char *argv[]) {
return 0;
}
- const char *plaintext_save_path = (argc >= 3) ? (argv[2]) : NULL;
+ const char *plaintext_save_path =
+ (argc >= 3 && strcmp(argv[2], "-j") != 0) ? (argv[2]) : NULL;
const char *ciphertext_file_path = argv[1];
/* open file */