Commit bd3f3bbe authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Initfile parser - small changes

parent cce80ff0
...@@ -91,14 +91,14 @@ namespace AMDiS { ...@@ -91,14 +91,14 @@ namespace AMDiS {
curDelim= checkDelim(val, delims); curDelim= checkDelim(val, delims);
pos= val.find(delims[curDelim], oldPos); pos= val.find(delims[curDelim], oldPos);
while( pos != std::string::npos ) { while( pos != std::string::npos ) {
std::string curWord= val.substr(oldPos, pos - 1); std::string curWord= val.substr(oldPos, pos - oldPos);
oldPos= pos + 1; oldPos= pos + 1;
convert(curWord, swap); convert(curWord, swap);
c.push_back(swap); c.push_back(swap);
pos= val.find(delims[curDelim], oldPos); pos= val.find(delims[curDelim], oldPos);
} }
//last entry //last entry
std::string curWord= val.substr(oldPos, val.length() - oldPos-1); std::string curWord= val.substr(oldPos, val.length()-1 - oldPos);
convert(curWord, swap); convert(curWord, swap);
c.push_back(swap); c.push_back(swap);
} catch (NoDelim nd) { } catch (NoDelim nd) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment