KMP implementation: fixinf case