diff --git a/Include/Aurora/Parse/LineParser.hpp b/Include/Aurora/Parse/LineParser.hpp index 780d7731..1f4cb168 100644 --- a/Include/Aurora/Parse/LineParser.hpp +++ b/Include/Aurora/Parse/LineParser.hpp @@ -13,9 +13,9 @@ namespace Aurora::Parse { AuMach index = 0, startIdx = 0; - while ((index = in.find("\n"), startIdx) != AuString::npos) + while ((index = in.find("\n", startIdx)) != AuString::npos) { - auto line = in.substr(0, index); + auto line = in.substr(startIdx, index - startIdx); startIdx = index + 1; if (line[line.size() - 1] == '\r')