I'm working on the CS50 pset3 problem resize (less comfortable). It looks like the resize is working, but I seem to be adding a lot of extra bytes to the header. Looking at the image itself it looks like 'the end' is off.
The image shows the result of n = 3. But I need to reset the 'start with byte' to 222, instead of 54. I can't figure out where I'm going wrong... Can anybody give me some insight?
The complete code can be found here.