summaryrefslogtreecommitdiffstats
path: root/comphelper/source/misc/accessiblekeybindinghelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/accessiblekeybindinghelper.cxx')
-rw-r--r--comphelper/source/misc/accessiblekeybindinghelper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx
index cf16f157c5e3..d1db69b98fa8 100644
--- a/comphelper/source/misc/accessiblekeybindinghelper.cxx
+++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <comphelper/accessiblekeybindinghelper.hxx>
+#include <o3tl/safeint.hxx>
namespace comphelper
@@ -83,7 +84,7 @@ namespace comphelper
{
std::scoped_lock aGuard( m_aMutex );
- if ( nIndex < 0 || nIndex >= static_cast<sal_Int32>(m_aKeyBindings.size()) )
+ if ( nIndex < 0 || o3tl::make_unsigned(nIndex) >= m_aKeyBindings.size() )
throw IndexOutOfBoundsException();
return m_aKeyBindings[nIndex];