bitreader: Simplify & fix a read stack buffer overflow
The current implementation was always reading the next byte, regardless of the buffer size. This commit simplifies the existing code and ensures we never read past the input buffer
Fix #16
Edited by Hugo Beauzée-Luyssen