Avoid truncation of expression assigned to larger type

This commit is contained in:
Paul Cornett
2019-04-05 09:55:49 -07:00
parent 1a90833839
commit 7cbe23830f
3 changed files with 5 additions and 5 deletions

View File

@@ -650,7 +650,7 @@ bool TextValidatorDialog::StyleValidator::TransferToWindow()
if ( !cb )
return false;
const long style = 1 << (cb->GetId()-wxID_HIGHEST-1);
const long style = 1L << (cb->GetId()-wxID_HIGHEST-1);
cb->SetValue((*m_style & style) != 0);
}
@@ -668,7 +668,7 @@ bool TextValidatorDialog::StyleValidator::TransferFromWindow()
if ( !cb )
return false;
const long style = 1 << (cb->GetId()-wxID_HIGHEST-1);
const long style = 1L << (cb->GetId()-wxID_HIGHEST-1);
if ( cb->IsChecked() )
*m_style |= style;