From e67bab4e6a220b27b87ca56829d39dc8b20a24b4 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 28 May 2022 03:09:52 +0800 Subject: Bugfix: image file will be saved as '-j' by accident. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') 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 */ -- cgit v1.2.3