Fixed seekBuffer functionality

This commit is contained in:
nolan 2025-09-20 21:32:08 -04:00
parent e5c9d5d74f
commit 98006ee300

View File

@ -26,11 +26,11 @@ void setBuffer(Buffer buffer, void *data){
void seekBuffer(Buffer buffer, unsigned int position){ void seekBuffer(Buffer buffer, unsigned int position){
switch (buffer){ switch (buffer){
case BUF_IN: case BUF_IN:
inByteOffset = position - (position % 8); inByteOffset = position / 8;
inBitOffset = position % 8; inBitOffset = position % 8;
break; break;
case BUF_OUT: case BUF_OUT:
outByteOffset = position - (position % 8); outByteOffset = position / 8;
outBitOffset = position % 8; outBitOffset = position % 8;
break; break;
} }