summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesStringWidget.cxx
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2015-09-12 14:35:36 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-16 12:42:20 (GMT)
commit6c442e5a899e07a85038c4f9c65dfe224ac9485e (patch)
tree67e6442a07c3c25a718dcf3d431844ed07fe8932 /Source/CursesDialog/cmCursesStringWidget.cxx
parent6dad4c25b06ae232c766d76747b080373fb2499d (diff)
downloadCMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.zip
CMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.tar.gz
CMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.tar.bz2
ccmake: Pass format string to 'printw' (#15738)
printw takes a format string as first argument, so don't pass variable strings to it directly.
Diffstat (limited to 'Source/CursesDialog/cmCursesStringWidget.cxx')
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index acf262f..eaa8739 100644
--- a/Source/CursesDialog/cmCursesStringWidget.cxx
+++ b/Source/CursesDialog/cmCursesStringWidget.cxx
@@ -221,6 +221,7 @@ bool cmCursesStringWidget::PrintKeys()
}
if (this->InEdit)
{
+ char fmt_s[] = "%s";
char firstLine[512];
// Clean the toolbar
for(int i=0; i<512; i++)
@@ -229,17 +230,16 @@ bool cmCursesStringWidget::PrintKeys()
}
firstLine[511] = '\0';
curses_move(y-4,0);
- printw(firstLine);
+ printw(fmt_s, firstLine);
curses_move(y-3,0);
- printw(firstLine);
+ printw(fmt_s, firstLine);
curses_move(y-2,0);
- printw(firstLine);
+ printw(fmt_s, firstLine);
curses_move(y-1,0);
- printw(firstLine);
+ printw(fmt_s, firstLine);
- sprintf(firstLine, "Editing option, press [enter] to leave edit.");
curses_move(y-3,0);
- printw(firstLine);
+ printw(fmt_s, "Editing option, press [enter] to leave edit.");
return true;
}
else