Fix the problem when no hit at the end of the string.
Merge pull request #204 from CodeErCn/master

Fix the problem when no hit at the end of the string.
Good work!