From e23633d2306c3e608c60f9b950a1b1fc11f1ef27 Mon Sep 17 00:00:00 2001 From: lu-l Date: Sun, 27 Oct 2024 14:27:00 -0300 Subject: [PATCH] v1.3.1 --- src/auditing-cybersecurity.h | 2 +- src/others/common.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/auditing-cybersecurity.h b/src/auditing-cybersecurity.h index 454f304..3f72249 100644 --- a/src/auditing-cybersecurity.h +++ b/src/auditing-cybersecurity.h @@ -247,7 +247,7 @@ int set_last_activity_error(int, char const *); int open_file(char *, char *, FILE **); int open_file_str(char *, char *, FILE **, char ***); int show_message(char *, int , int , int , bool, bool, bool); -char * get_readline(char *, bool ); +char * get_readline(char *, bool); int format_strings_from_files(char *, char *); void show_intro(char *, char *); void show_intro_banner(); diff --git a/src/others/common.c b/src/others/common.c index d6d7001..a514ee1 100644 --- a/src/others/common.c +++ b/src/others/common.c @@ -21,8 +21,12 @@ char * get_readline(char *prompt, bool addHistory){ free(lineRead); lineRead=(char *)NULL; } - printf("%s",prompt); - lineRead=readline(" "); + if(addHistory){ + lineRead=readline(prompt); + }else{ + printf("%s",prompt); + lineRead=readline(" "); + } if(lineRead && *lineRead && addHistory) add_history (lineRead); return (lineRead); }