Version v0.2.31 - fixed signed/unsigned comparison warning in enhanced input function

This commit is contained in:
2025-08-13 11:11:08 -04:00
parent 24800d69d5
commit c255185084
2 changed files with 8 additions and 1 deletions

2
otp.c
View File

@@ -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;

7
test_file.txt.otp.asc Normal file
View File

@@ -0,0 +1,7 @@
-----BEGIN OTP MESSAGE-----
Version: v0.2.29
Pad-ChkSum: d0d4a489354348b08d8c7b324814d8c50010042e9da47f2c973f32a16a09101b
Pad-Offset: 57
05S8GfS0tFfczNMUz0xrieFGoPSREM4uo5QhFGoBCcOzjfTXTDMt3hRtAQ==
-----END OTP MESSAGE-----