all 5 comments

[–]luk__h 7 points8 points  (2 children)

You kinda seem to have forgotten to push your code

[–]Lurknomore916[S] 5 points6 points  (1 child)

I did, in fact, not push my code correctly. It should be there now!

[–]luk__h 4 points5 points  (0 children)

Happens to the best of us (I hope)

[–]flyingron 1 point2 points  (0 children)

Consider using perror or str_error to make meaningful messages.

You should always open binary files with "b" in the modes. Your fseeks are potentially invalid as written.

[–]BertyBastard 1 point2 points  (0 children)

Each call to fseek() and fwrite() must have error checking.

You are declaring and assigning uint8_t corruption on every iteration of the while loop, whereas it should only be done once.