Skip to content

Commit 4f34622

Browse files
committed
fmt: Fix lifetime issue
1 parent 27220d5 commit 4f34622

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

generators/include/pl/formatters/formatter_json.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ namespace pl::gen::fmt {
6767
const auto string = pattern->toString();
6868

6969
std::string result;
70-
for (const auto &ch : wolv::util::utf8ToUtf32(string, true).value()) {
70+
const auto decodedString = wolv::util::utf8ToUtf32(string, true).value();
71+
for (const auto &ch : decodedString) {
7172
switch (ch) {
7273
case U'"': result += "\\\""; break;
7374
case U'\\': result += "\\\\"; break;

0 commit comments

Comments
 (0)