From e92b3cf12f874cf4567f157bbca28dec8113ab98 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 28 Aug 2021 23:25:16 +0200 Subject: [PATCH] Fix an extra space being added in the stringInterpolation() function of 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 d16335b..47b0112 100644 --- a/src/headers/transpiler/Target.hpp +++ b/src/headers/transpiler/Target.hpp @@ -47,7 +47,7 @@ protected: const bool closingBraceIsNPOS = closingBrace == string::npos; const bool wrongClosingBrace = !closingBraceIsNPOS && ((hasNext && closingBrace > interpolationVector[i + 1])); if (closingBraceIsNPOS || wrongClosingBrace) { - output << view.substr(occurence - 1, (hasNext ? interpolationVector[i + 1] - (occurence - 1) : 0)); + output << view.substr(occurence, (hasNext ? interpolationVector[i + 1] - occurence : 0)); } output << closeCharacters; if (not closingBraceIsNPOS && not wrongClosingBrace) {