#### Archived

This topic is now archived and is closed to further replies.

## Recommended Posts

##### Share on other sites
synopsis    122
Hi,

That assertation will raise if filename points to NULL, as far as I can see. You might want to install the CRT sources, because they are often helpful. You''ll see that _tfopen does not modify the first argument (the filename) before passing it to _tfsopen, which ASSERTs that filename != NULL.

Try to write
  const char *szFileName = "crate.tga"//...bool bReturnValue = false;bReturn Value = LoadTga(&textures[0], szFileName);if(!bReturnValue)//....

This ensures that the compiler really generates the string. I think the compiler does not store your string in the program''s data segment. Try to search the binary (the .exe or .dll) for the string "crate.tga". If it is not in there, it was probably optimized away. Also try to set warning level to 4, which will probably give you a warning such as ''function call in a conditional expression'' or such.

Hope this helps,
syn