Skip to content
Snippets Groups Projects
Commit 2ff4faa4 authored by Niklas Schrötler's avatar Niklas Schrötler
Browse files

BitwiseWriter: Fixed file ending in zero byte when bitwise-length is a multiple of 8

parent 97fbce5a
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,10 @@ BitwiseWriter init_bitwise_writer(FILE * f) {
}
void flush(BitwiseWriter * self) {
if(self->bitcounter == 0) {
return;
}
fwrite((char[]){self->currByte}, 1, 1, self->targetFile);
self->bitcounter = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment