Fix a hang that occurs when scanning a corrupt TrueType file.

Stop accepting -1 (EOF) as an array index when reading names from a TrueType file.

This relates in part to #1798.

More than 0xFFFF or less than zero is outside of what this data type can hold, are you sure that it will not just revert to a value within boundaries in case of overflow? Usually overflow checking is done when calculating, e.g. via checked arithmetic.