int CScriptFile::Open(const std::string &filename, const std::string &mode)
{
// Close the previously opened file handle
if( file )
Close();
// Validate the mode
string m;
#ifndef asNO_WRITE_OPS
if( mode != "r" && mode != "w" && mode != "a" )
#else
if( mode != "r" )
#endif
return -1;
// By default windows translates "\r\n" to "\n", but we want to read the file as-is.
m += "b";
// Open the file
file = fopen(filename.c_str(), m.c_str());
if( file == 0 )
return -1;
return 0;
}
Miss assigned 'mode' to 'm'.
CScriptFile::Open bug
Hello.
Oops! :)
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement