Is the hex byte 1A special?
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"
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement