Fixed problem when opening the story scene. Nevertheless, that function must be improved.

git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@190 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-07-28 18:41:31 +00:00
parent 4e714eab46
commit 2f742e925e
4 changed files with 49 additions and 45 deletions

View File

@@ -17,7 +17,7 @@ using namespace std;
CExeFile::CExeFile(int episode, const std::string& datadirectory) {
m_episode = episode;
m_datadirectory = datadirectory;
if( m_datadirectory != "" && *(m_datadirectory.end()) != '/') m_datadirectory += "/";
if( m_datadirectory != "") if(*(m_datadirectory.end()-1) != '/') m_datadirectory += "/";
m_data = NULL;
}
@@ -30,7 +30,6 @@ bool CExeFile::readData()
std::string filename = "data/" + m_datadirectory + "keen" + itoa(m_episode) + ".exe";
std::ifstream File; OpenGameFileR(File, filename, ios::binary);
// TODO: If Exe-file wasn't detected, make the program quit somehow, or it crashes
if(!File) return false;