Skip to content
Snippets Groups Projects
Commit 4ef31e39 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

tidy: fix conversion unsigned -> signed

parent 31e509d0
No related branches found
No related tags found
1 merge request!215Merge jt
......@@ -50,11 +50,12 @@ ext::set < unsigned > QuiteNaive::match ( const string::LinearString < SymbolTyp
if ( pat[m-1] != text[s+m-1] ) {
s += gamma;
} else {
ssize_t j = m - 2;
while ( j >= 0 && pat[j] == text[s+j] )
-- j;
// Note: loop here goes in other direction than in the paper
size_t j = 0;
while ( j + 2 <= m && pat[j] == text[s+j] )
++ j;
 
if ( j < 0 )
if ( j + 2 > m )
occ.insert(s);
s += delta;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment