From 51a74726e6f68851bafccba0fe69900274a81d59 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 17 Jul 2025 19:39:27 +0800 Subject: Fixed a reference issue. --- src/yuescript/yue_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index f952e9a..3768fc9 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -9179,7 +9179,7 @@ private: } void transformYAMLMultiline(YAMLMultiline_t* multiline, str_list& out) { - std::optional indent; + std::optional indent; str_list temp; for (auto line_ : multiline->lines.objects()) { auto line = static_cast(line_); @@ -9210,7 +9210,7 @@ private: if (pos == std::string::npos) { throw CompileError("expecting first line indent"sv, line); } - indent = std::string_view{lineStr.c_str(), pos}; + indent = std::string{lineStr.c_str(), pos}; } else { if (std::string_view{lineStr}.substr(0, indent.value().size()) != indent.value()) { throw CompileError("inconsistent indent"sv, line); -- cgit v1.2.3-55-g6feb