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.

Edit: oh, the function does not return a short int. But still, I'm not sure that storing erratic data and checking its validity when you make use of it is the better way.