A Correct Preprocessing Algorithm for Boyer-Moore String-Searching

We present the correction to Knuth’s algorithm [2] for computing the table of pattern shifts later used in the Boyer–Moore algorithm for pattern matching.