summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup_native/source/win32/customactions/sellang/sellang.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index e9b644af93ae..9c6ab5326f73 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -33,6 +33,7 @@
#include <sal/macros.h>
#include <systools/win32/uwinapi.h>
+#include <algorithm>
#include "spellchecker_selection.hxx"
@@ -184,7 +185,7 @@ static BOOL
present_in_ui_langs(const char *lang)
{
for (int i = 0; i < num_ui_langs; i++)
- if (memcmp (ui_langs[i], lang, ( strlen(ui_langs[i]) >= strlen(lang) ) ? strlen(lang) : strlen(ui_langs[i]) ) == 0)
+ if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), strlen(lang))) == 0)
return TRUE;
return FALSE;
}