fixes bug with early stream eof

While providing more characters upon underflow, one character must
be returned in an integer format, which is larger than the character
format.  This conversion was not done properly, resuling in the
stream being considered eof, when 0xff was the first byte of a block.