tokenize: avoid "terminate called after throwing an instance of 'std::out_of_range'"

This commit is contained in:
Daniel Marjamäki 2009-01-09 18:00:11 +00:00
parent c7730044c7
commit 6bdb14edfd
1 changed files with 2 additions and 1 deletions

View File

@ -281,7 +281,8 @@ void Tokenizer::tokenizeCode(std::istream &code, const unsigned int FileIndex)
{
// Extract the filename
line.erase(0, line.find("\"") + 1);
line.erase(line.find("\""));
if (line.find("\"") != std::string::npos)
line.erase(line.find("\""));
// Relative path..
if (_files.back().find_first_of("\\/") != std::string::npos)