Skip to content

Commit

Permalink
Let's also pass the size of newStr in his replace method
Browse files Browse the repository at this point in the history
  • Loading branch information
Toon Schoenmakers committed Nov 13, 2014
1 parent aaa0ff3 commit 3046fd4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/ccode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ void CCode::foreach(const Variable *variable, const std::string &key, const std:

// end of the block
_out << '}' << std::endl;

}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/escaper.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Escaper
while ((pos = input.find(oldStr, pos)) != std::string::npos)
{
// Replace that what we were looking for with newStr
input.replace(pos, oldStrLen, newStr);
input.replace(pos, oldStrLen, newStr, newStrLen);
pos += newStrLen;
}
return input;
Expand Down

0 comments on commit 3046fd4

Please sign in to comment.