66396e7ca7
Bit-wise operation is inappropriate here because `c` might be negative, since EOF is generally represented as -1. Since -1 is stored as all bits at 1 on most common architectures, the test will evaluate to true, hence entering an infinite loop.