Wednesday, March 12, 2008

ox1A and Dev C++

I was using this Dev C++ version 4 to compile to code written to convert the jpeg to exif format. and after trying for 2 hours to debug my code, I came to know the actual bug.

Actually, whenever it encounters 0x1A in the source file, it reads it as 0xFF. I tried fscanf, fgetc, fread, but none of them seem to work with this. When I am reading using fgetc and printing on the stdout, it prints 0xFF, when it should actually print ox1A, and after that the program hangs. I think this is a bug in the compiler :)

yeye, no bug in my code :)

No comments: