X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b0f84db4a3988a17c380824e5b7183a18f89622..4b2424bcadbc87babd3367d243b957e49333eeae:/src/msw/settings.cpp?ds=sidebyside diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index b2788d0aae..4793d47ff3 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -333,7 +333,8 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index) // TODO: probably use wxUniv themes functionality return 0; #else // !__WXMICROWIN__ - wxCHECK_MSG( index < WXSIZEOF(gs_metricsMap), 0, _T("invalid metric") ); + wxCHECK_MSG( index > 0 && (size_t)index < WXSIZEOF(gs_metricsMap), 0, + _T("invalid metric") ); int indexMSW = gs_metricsMap[index]; if ( indexMSW == -1 )