X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e02e8816c7a9be2082f914f6d53fcdba0d7d5416..4b2424bcadbc87babd3367d243b957e49333eeae:/src/msw/settings.cpp 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 )