Fix wrong value set in Preferences->Performance->"Define Large File Size"
Use correct type for file size variables. Fix #13280, close #13290
This commit is contained in:
parent
081e8ad11b
commit
568075beb5
|
@ -5731,8 +5731,8 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
||||||
{
|
{
|
||||||
int fileSizeLimit4StylingMB = 0;
|
int fileSizeLimit4StylingMB = 0;
|
||||||
element->Attribute(TEXT("fileSizeMB"), &fileSizeLimit4StylingMB);
|
element->Attribute(TEXT("fileSizeMB"), &fileSizeLimit4StylingMB);
|
||||||
if (fileSizeLimit4StylingMB > 0 && fileSizeLimit4StylingMB < 4096)
|
if (fileSizeLimit4StylingMB > 0 && fileSizeLimit4StylingMB <= 4096)
|
||||||
_nppGUI._largeFileRestriction._largeFileSizeDefInByte = (fileSizeLimit4StylingMB * 1024 * 1024);
|
_nppGUI._largeFileRestriction._largeFileSizeDefInByte = (static_cast<int64_t>(fileSizeLimit4StylingMB) * 1024 * 1024);
|
||||||
|
|
||||||
const TCHAR* boolVal = element->Attribute(TEXT("isEnabled"));
|
const TCHAR* boolVal = element->Attribute(TEXT("isEnabled"));
|
||||||
if (boolVal != NULL && !lstrcmp(boolVal, TEXT("no")))
|
if (boolVal != NULL && !lstrcmp(boolVal, TEXT("no")))
|
||||||
|
|
|
@ -5166,7 +5166,7 @@ intptr_t CALLBACK PerformanceSubDlg::run_dlgProc(UINT message , WPARAM wParam, L
|
||||||
if (lstrcmp(str, TEXT("")) == 0)
|
if (lstrcmp(str, TEXT("")) == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
size_t fileLenInMB = ::GetDlgItemInt(_hSelf, IDC_EDIT_PERFORMANCE_FILESIZE, NULL, FALSE);
|
int64_t fileLenInMB = ::GetDlgItemInt(_hSelf, IDC_EDIT_PERFORMANCE_FILESIZE, NULL, FALSE);
|
||||||
|
|
||||||
if (fileLenInMB > 4096)
|
if (fileLenInMB > 4096)
|
||||||
{
|
{
|
||||||
|
@ -5195,7 +5195,7 @@ intptr_t CALLBACK PerformanceSubDlg::run_dlgProc(UINT message , WPARAM wParam, L
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t fileLenInMB = ::GetDlgItemInt(_hSelf, IDC_EDIT_PERFORMANCE_FILESIZE, NULL, FALSE);
|
int64_t fileLenInMB = ::GetDlgItemInt(_hSelf, IDC_EDIT_PERFORMANCE_FILESIZE, NULL, FALSE);
|
||||||
|
|
||||||
if (fileLenInMB == 0)
|
if (fileLenInMB == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue