e- / Hangul.js

한글 자음/모음 분리/조합 자바스크립트 라이브러리. 자바스크립트 한글 오토마타 구현체입니다.
https://e-.github.io/Hangul.js/examples/
MIT License
694 stars 96 forks source link

Infinite loop when Hangul.rangeSearch() for empty string '' #6

Closed Leftium closed 8 years ago

Leftium commented 8 years ago

When the needle parameter of rangeSearch() is passed '' (empty string) the browser hangs with an infinite loop.

rangeSearch() should return an empty array if needle is an empty string.

e- commented 8 years ago

What a big mistake! I fixed it. Thanks!