[Libreoffice-commits] core.git: unotools/source

Caolán McNamara caolanm at redhat.com
Mon Aug 15 10:33:59 UTC 2016


 unotools/source/i18n/textsearch.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9e87c064408aa9549336d4ce463e2c2315d30001
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 11:00:31 2016 +0100

    ubsan: -1 is not a valid value for type 'css::util::SearchAlgorithms'
    
    Change-Id: I59e435c1814da57c318c12f2c1539542960f5b90

diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index fa520d0..6cab875 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -201,10 +201,10 @@ void TextSearch::Init( const SearchParam & rParam,
     {
     case SearchParam::SRCH_WILDCARD:
         aSOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD;
+        aSOpt.algorithmType = SearchAlgorithms_MAKE_FIXED_SIZE;    // no old enum for that
         aSOpt.WildcardEscapeCharacter = rParam.GetWildEscChar();
         if (rParam.IsWildMatchSel())
             aSOpt.searchFlag |= SearchFlags::WILD_MATCH_SELECTION;
-        aSOpt.algorithmType = static_cast<SearchAlgorithms>(-1);    // no old enum for that
         break;
 
     case SearchParam::SRCH_REGEXP:


More information about the Libreoffice-commits mailing list