timdream / jszhuyin

JS 注音:JavaScript 自動選字注音輸入法;"Smart" Chinese Zhuyin Input Method in JavaScript.
https://jszhuyin.timdream.org/
MIT License
223 stars 19 forks source link

Validate database #27

Open timdream opened 8 years ago

timdream commented 8 years ago

It's possible the data is truncated during network transfer. The loaded data is not validated currently so it ended up generate runtime JS error. It would be good if the typed array can be validated (by checking the length at least) when it is being loaded.