i got 2 diferent problems, depending on what date im reading, when im reading a short my problem is that the bytes are inversed, the first 2 bytes in the file are FFD8 and when read the give me D8FF, since i read it in a short it gives me 55551 when it should give me 65496... i know this is probably stupid and everyone knew that byte were inversed or something... but how can I compare shorts if there dont have the value they are suposed to....
my second problem is when i read a string...
all my strings i read from the file are missing le last char
my string is suposed to give me "JFIF\0" and instead i get "JFIF", then I tough it was maybe just because of the null char so I checked elsewere in my code where Im suposed to get the value "RIFF" and get "RIF" instead...
anyone can help?
my second problem is when i read a string...
all my strings i read from the file are missing le last char
my string is suposed to give me "JFIF\0" and instead i get "JFIF", then I tough it was maybe just because of the null char so I checked elsewere in my code where Im suposed to get the value "RIFF" and get "RIF" instead...
anyone can help?