diff --git a/testtokenize.cpp b/testtokenize.cpp index 12486588f..13c3f3b55 100644 --- a/testtokenize.cpp +++ b/testtokenize.cpp @@ -226,6 +226,7 @@ private: // Test for not found ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "notfound" ), -1 ); ASSERT_EQUALS( TOKEN::multiCompare( "verybig|two", "s" ), -1 ); + ASSERT_EQUALS( TOKEN::multiCompare( "one|two", "ne" ), -1 ); } }; diff --git a/token.cpp b/token.cpp index 522b0cf49..6820ae1e2 100644 --- a/token.cpp +++ b/token.cpp @@ -105,6 +105,8 @@ int TOKEN::multiCompare( const char *needle, const char *haystack ) continue; } + else if( findNextOr ) + continue; // If this part of needle equals to the haystack else if( strncmp( haystack, needle, strlen( haystack ) ) == 0 )