[fix] chars out of range in get_string_script Python version

This commit is contained in:
Al
2015-09-22 08:14:27 -04:00
parent ca25b48687
commit b405a53fe1

View File

@@ -163,6 +163,8 @@ def get_string_script(s):
is_ascii = True
script_len = 0
for c in s:
if (ord(c)) >= len(char_scripts):
continue
script = char_scripts[ord(c)]
if script == COMMON_SCRIPT and last_script != UNKNOWN_SCRIPT:
script = last_script