Permalink
Browse files

Handle the case of a literal query of length 1.

  • Loading branch information...
ggreer committed Feb 18, 2012
1 parent c8ed59b commit 01ce38f7f578b6b6141385688ff3c068390635df
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/util.c
View
@@ -12,7 +12,7 @@ void generate_skip_lookup(const char *find, size_t f_len, size_t skip_lookup[],
size_t i = 0;
for (i = 0; i < 256; i++) {
skip_lookup[i] = f_len - 1;
skip_lookup[i] = f_len - 1 || 1; /* Handle the case of f_len == 1 */
}
for (i = 0; i < f_len - 1; i++) {

0 comments on commit 01ce38f

Please sign in to comment.