[Bug 1759] getc returns 0x000000FF instead of 0xFFFFFFFF (-1) for EOF