X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d6d3bf31edc02abde8b32a8725f69f396f3dfff..ee3510132b8b4160f848bd4f502a6f5315f90dbc:/src/msw/settings.cpp diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 85d8b311f4..4793d47ff3 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -25,6 +25,7 @@ #endif #ifndef WX_PRECOMP + #include "wx/utils.h" #include "wx/gdicmn.h" #endif @@ -332,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 )