fix improper function usage

This commit is contained in:
2025-03-12 14:19:45 +01:00
parent 5fc24393c5
commit 58e9428299
2 changed files with 143 additions and 97 deletions
+5 -1
View File
@@ -13,6 +13,7 @@
#include <string>
#include <termios.h>
#include <unistd.h>
#include "main.h"
void safe_exit(int code) {
switch (code) {
@@ -150,7 +151,10 @@ void wprint_in_middle(WINDOW *win, int starty, int startx, int width,
temp = (width - length) / 2;
x = startx + (int)temp;
wattron(win, color);
mvwaddwstr(win, y, x, string);
if (mvwaddwstr(win, y, x, string) == ERR) {
if(config.verbose){
std::wcerr << RED"[ERROR]"<< RESET" wprint_in_middle failed to print " << string << "\n";
}}
wattroff(win, color);
refresh();
}