Fix overflow of TRE_CHAR_MAX

TRE_CHAR_MAX must fit in int.