Merge pull request #212 from vitalyvolkov/master

Handle the exception of IndexError when list item access is out of range
This commit is contained in:
Behdad Esfahbod 2015-04-08 14:33:23 -07:00
commit 64a5103a77

View File

@ -94,7 +94,10 @@ class table__p_o_s_t(DefaultTable.DefaultTable):
if index > 32767: # reserved for future use; ignore
name = ""
elif index > 257:
name = extraNames[index-258]
try:
name = extraNames[index-258]
except IndexError:
name = ""
else:
# fetch names from standard list
name = standardGlyphOrder[index]