diff --git a/ex04/sed.cpp b/ex04/sed.cpp index ca1a354..a23a5a9 100644 --- a/ex04/sed.cpp +++ b/ex04/sed.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/07 16:45:25 by adjoly #+# #+# */ -/* Updated: 2024/11/07 18:45:45 by adjoly ### ########.fr */ +/* Updated: 2024/11/09 18:49:49 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,7 +29,7 @@ Sed::Sed(std::string &inFile, std::string &s1, std::string &s2): buf << infile.rdbuf(); _content = buf.str(); infile.close(); - pos = _content.find(s1, pos + s2.length()); + pos = _content.find(s1, pos); while (pos < _content.length()) { _content.erase(pos, s1.length());