diff --git a/otp.c b/otp.c index 49e26c5..cdd715b 100644 --- a/otp.c +++ b/otp.c @@ -2447,7 +2447,7 @@ int get_filename_with_default(const char* prompt, const char* default_path, char } } else if (c >= 32 && c <= 126) { // Printable character - if (buffer_len < sizeof(edit_buffer) - 1) { + if (buffer_len < (int)sizeof(edit_buffer) - 1) { // Move everything after cursor one position right memmove(&edit_buffer[cursor_pos + 1], &edit_buffer[cursor_pos], buffer_len - cursor_pos + 1); edit_buffer[cursor_pos] = c; diff --git a/test_file.txt.otp.asc b/test_file.txt.otp.asc new file mode 100644 index 0000000..779c9e5 --- /dev/null +++ b/test_file.txt.otp.asc @@ -0,0 +1,7 @@ +-----BEGIN OTP MESSAGE----- +Version: v0.2.29 +Pad-ChkSum: d0d4a489354348b08d8c7b324814d8c50010042e9da47f2c973f32a16a09101b +Pad-Offset: 57 + +05S8GfS0tFfczNMUz0xrieFGoPSREM4uo5QhFGoBCcOzjfTXTDMt3hRtAQ== +-----END OTP MESSAGE-----