Compare commits

...

2 Commits

Author SHA1 Message Date
09ea57f146 Version v0.2.100 - Correct bug 2025-08-27 09:15:30 -04:00
0ae2423f19 Version v0.2.99 - Correct bug 2025-08-27 09:12:58 -04:00

7
otp.c
View File

@@ -315,9 +315,8 @@ int command_line_mode(int argc, char* argv[]) {
} }
free(default_pad); free(default_pad);
// Call encrypt_text and then comment about using default pad // Call encrypt_text and return result
int result = encrypt_text(pad_identifier, text); return encrypt_text(pad_identifier, text);
return result;
} else { } else {
printf("Error: No default pad configured. Specify pad explicitly or configure default pad.\n"); printf("Error: No default pad configured. Specify pad explicitly or configure default pad.\n");
return 1; return 1;
@@ -1531,7 +1530,7 @@ int encrypt_text(const char* pad_identifier, const char* input_text) {
if (is_interactive) { if (is_interactive) {
printf("\n\n%s\n\n", ascii_output); printf("\n\n%s\n\n", ascii_output);
} else { } else {
printf("%s", ascii_output); printf("%s\n", ascii_output); // Add newline for proper piping with tee
} }
// Cleanup // Cleanup