diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 6c7627f92..6b7d89e3b 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -409,12 +409,11 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */) char thirdLine[512]=""; if (process) { - sprintf(firstLine, - " "); - sprintf(secondLine, - " "); - sprintf(thirdLine, - " "); + const char* clearLine = + " "; + strcpy(firstLine, clearLine); + strcpy(secondLine, clearLine); + strcpy(thirdLine, clearLine); } else {