From 1d6efb1e4ecd742e6ad2e3e4a4255ada727726c4 Mon Sep 17 00:00:00 2001 From: Reece Date: Wed, 30 Jun 2021 10:28:28 +0100 Subject: [PATCH] [*] Amend broken optimization --- Include/Aurora/Parse/LineParser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')