Fix negative repeat value in Column Editor causes hang issue

Fix #15153, close #15166
pull/15173/head
molsonkiko 2024-05-20 15:26:56 -07:00 committed by Don Ho
parent 912c5ee300
commit 106bdcc016
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
int initialNumber = ::GetDlgItemInt(_hSelf, IDC_COL_INITNUM_EDIT, NULL, TRUE);
int increaseNumber = ::GetDlgItemInt(_hSelf, IDC_COL_INCREASENUM_EDIT, NULL, TRUE);
int repeat = ::GetDlgItemInt(_hSelf, IDC_COL_REPEATNUM_EDIT, NULL, TRUE);
if (repeat == 0)
if (repeat <= 0)
{
repeat = 1; // Without this we might get an infinite loop while calculating the set "numbers" below.
}