🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Is the hex byte 1A special?

Started by
1 comment, last by menasius 24 years, 6 months ago
I wrote a small importer for TGA files, and in the interest of portability later down the road I didn''t use any win32 specific functions (createFile readFile etc). My problem is it seems that whenever the file stream gets to an 1A byte it stops and the remainder of the stream is whatever that address in memory used to be (as if it weren''t given a new value). This happens no matter where the 1A is in the stream. If 1A isnt special and its not a prgramming error on my part I have been replacing parts from a recent heat incident is it possible that something I havent replaced would be this specific in its error? Thanks in advance -Menasius
-menasius"Quitters never win...winners never quit...but those who never win and never quit, are idiots"
Advertisement
Make sure you open the file as binary. That is for ANSI c:
file=fopen("name.tga", "rb");

and for c++ iostreams:
ifstream file("name.tga", ios::in :: ios::binary);



Edited by - Alastair on 1/4/00 12:38:36 PM
<slaping himself severely> oh yeah... its always the little things you forget

thanks
-bart
-menasius"Quitters never win...winners never quit...but those who never win and never quit, are idiots"

This topic is closed to new replies.

Advertisement