terminal: Don't crash when selecting non-ascii characters
terminal: Don't crash when selecting non-ascii characters

So it turns out if you cat /dev/urandom and drag select in the mess
you can crash weston-terminal.  There may also be more legitimate
ways of doing this.

The reason is that isalpha() and isdigit() only accept values that
fit within an unsigned char or are EOF.

By treating values < 0 the same as values > 127 we prevent this crash.

Signed-off-by: Derek Foreman <2f97e0f0bc172406aab8ccd42dab54c95bab8759@osg.samsung.com>
Reviewed-by: Bryce Harrington <bdb14cfc1ab8d24e13de84adc40b41ae60c13bd1@osg.samsung.com>

kwm81/weston,Fantu/compositor-spice,udoprog/weston,Tarnyko/weston-xdg_surface_present,sir-murray/weston,kwm81/weston,Fantu/compositor-spice,Gnurou/weston,Fantu/compositor-spice,giucam/weston,Tarnyko/weston-xdg_surface_present,Gnurou/weston,krezovic/weston,udoprog/weston,giucam/weston,sir-murray/weston,krezovic/weston