From d5a816ae38c212f07d4346188b310a1fa918a483 Mon Sep 17 00:00:00 2001 From: nova Date: Fri, 24 Oct 2025 19:18:26 +0200 Subject: [PATCH] formatted the single worst line within the entire program --- interactions.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interactions.c b/interactions.c index 1eb525e..19f142f 100644 --- a/interactions.c +++ b/interactions.c @@ -447,7 +447,10 @@ void delete(){ memset(btm_buffer, ' ', BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width); memcpy(btm_buffer, "delete: ",strlen("delete: ")); - memcpy(btm_buffer + strlen("delete: "), file_str, (strlen(file_str) > ((BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width) - terminal_width) ? ((BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width) - terminal_width) : strlen(file_str))); + memcpy(btm_buffer + strlen("delete: "), file_str, /* this horrendous check tries to copy everything until the last line, while keeping said last line unwritten */ + (strlen(file_str) > ((BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width) - terminal_width) ? + ((BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width) - terminal_width) : + strlen(file_str))); memcpy(btm_buffer + (BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width - terminal_width) , "(y/N)", strlen("(y/N)")); btm_buffer[BTM_WINDOW_HEIGHT_ON_STR_INTERACTION * terminal_width] = '\0';