diff options
author | Brad King <brad.king@kitware.com> | 2020-05-20 13:11:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-20 13:12:22 (GMT) |
commit | f60ca6b4649516bc49459b3b41b5e8187c4ea5e6 (patch) | |
tree | 9bcadaf1ea0ff79b8f6bb2271bb707354831fa93 /Source | |
parent | 00d6e41a07adb815768bc6dbb4b29582d6264be9 (diff) | |
parent | 3aede31cfc354a756d3f5b0e0e985231285eaeaf (diff) | |
download | CMake-f60ca6b4649516bc49459b3b41b5e8187c4ea5e6.zip CMake-f60ca6b4649516bc49459b3b41b5e8187c4ea5e6.tar.gz CMake-f60ca6b4649516bc49459b3b41b5e8187c4ea5e6.tar.bz2 |
Merge topic 'ccmake-check-width'
3aede31cfc ccmake: Check that getmaxyx result width is non-negative
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4770
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 664ba2f..591c546 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -68,7 +68,7 @@ void cmCursesLongMessageForm::UpdateStatusBar() bar[i] = ' '; } int width; - if (x < cmCursesMainForm::MAX_WIDTH) { + if (x >= 0 && x < cmCursesMainForm::MAX_WIDTH) { width = x; } else { width = cmCursesMainForm::MAX_WIDTH - 1; |