diff --git a/binaryEditor.c b/binaryEditor.c index 9137774..ba08da8 100644 --- a/binaryEditor.c +++ b/binaryEditor.c @@ -26,11 +26,11 @@ void setBuffer(Buffer buffer, void *data){ void seekBuffer(Buffer buffer, unsigned int position){ switch (buffer){ case BUF_IN: - inByteOffset = position - (position % 8); + inByteOffset = position / 8; inBitOffset = position % 8; break; case BUF_OUT: - outByteOffset = position - (position % 8); + outByteOffset = position / 8; outBitOffset = position % 8; break; }