From b5697bf0a813a48c7005f46567d775393f3d2d75 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 1 Sep 2021 19:31:04 +0200 Subject: [PATCH] Take the remaining characters of a string instead of taking none in a condition of the stringInterpolation() function from Target.hpp --- src/headers/transpiler/Target.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/headers/transpiler/Target.hpp b/src/headers/transpiler/Target.hpp index c39baa1..21feae7 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -50,7 +50,7 @@ protected: const bool closingBraceIsNPOS = closingBrace == string::npos; const bool wrongClosingBrace = !closingBraceIsNPOS && ((hasNext && closingBrace > interpolationVector[i + 1])); if (closingBraceIsNPOS || wrongClosingBrace) { - output << view.substr(occurrence, (hasNext ? interpolationVector[i + 1] - occurrence : 0)); + output << view.substr(occurrence, (hasNext ? interpolationVector[i + 1] - occurrence : string::npos)); } output << closeCharacters; if (not closingBraceIsNPOS && not wrongClosingBrace) {