My code only recovers images till 008.jpg and does not pass the 000.jpg or 0001.jpg test of check50. What is wrong with my code?
Here is my code - https://pastebin.com/QmJG7ccX
UPDATE 1 - https://pastebin.com/kuN09swU
UPDATE 2 - So I'm able to recover all 50 images now, but they appear to have only one block of 512 bytes. Where am I going wrong?
Here is the code - https://pastebin.com/tZb8cC6N
UPDATE 3- Just added an else before
if(c>0)
in update 2 code and now all the images are being recovered properly except for 000.jpg
UPDATE 4 - Finally Got it working :D