Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug when first byte from a LESSOPEN script is non-ASCII.
open_altfile reads one byte to see if the LESSSOPEN script will produce any data, then pushes it back on the input queue via ch_ungetchar. But the variable is declared as "char", so if the first byte has the high bit set, and the compiler uses signed chars, this will sign-extend and pass a negative value to ch_ungetchar. ch_ungetchar takes a negative value as a signal to discard any queued char.
- Loading branch information