diff --git a/src/game.cpp b/src/game.cpp index 94f148a..deb1152 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -234,7 +234,7 @@ void levelMessage() { string msg = ss.str(); // print + pause - printw(msg.c_str()); + printw("%s", msg.c_str()); refresh(); usleep(1500000); diff --git a/src/helperFns.cpp b/src/helperFns.cpp index 50f5c2d..f4466aa 100644 --- a/src/helperFns.cpp +++ b/src/helperFns.cpp @@ -100,14 +100,14 @@ void printAtBottomChar(char msg) { //mtx.lock(); std::string x; x += msg; - mvprintw(TOP+5, 0, (x).c_str()); + mvprintw(TOP+5, 0, "%s", (x).c_str()); //mtx.unlock(); } void printAtBottom(std::string msg) { //mtx.lock(); int x, y; getyx(stdscr, y, x); - mvprintw(TOP+1, 1, msg.c_str()); + mvprintw(TOP+1, 1, "%s", msg.c_str()); mvinch(y,x); move(y,x);