Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Can someone explain why this fixes the problem.
Think about a machine where char is signed by default. Extracting \254
into an int will produce -2, which will not equal \254 returned by getc.
regards, tom lane