取消固定长度类型长度禁用以支持数组

This commit is contained in:
gb 2024-01-24 17:56:54 +08:00
parent 79907ddc8d
commit 698d233af9
2 changed files with 3 additions and 2 deletions

View File

@ -2427,9 +2427,10 @@ void CDlgOptJson::OnBnClickedButtonModify()
return;
}
if (sop.type == L"bool" && sop.size <= sizeof(int))
if (((sop.type == L"bool" || sop.type == L"int") && sop.size < sizeof(int))
|| (sop.type == L"float" && sop.size < sizeof(double)))
{
MessageBox(TEXT("sizeof type 'boolean' at least 4!"));
MessageBox(TEXT("sizeof type 'boolean' and 'int' at least 4; 'double' at least 8!"));
GotoDlgCtrl(GetDlgItem(IDC_EDIT_SIZE));
return;
}

Binary file not shown.