Fix bug where char val 255 was interpreted as EOF