From bd3a264011cfaa8149a5a0f849958907bd8f91a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:53:12 +0300 Subject: [PATCH] Fix BBCode print with nested `[`. --- core/string/print_string.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/string/print_string.cpp b/core/string/print_string.cpp index 9d01efd802c..57b6bdf58cf 100644 --- a/core/string/print_string.cpp +++ b/core/string/print_string.cpp @@ -257,7 +257,8 @@ void __print_line_rich(const String &p_string) { } else if (tag == "/fgcolor") { output += "\u001b[39;49m"; } else { - output += vformat("[%s]", tag); + output += "["; + pos = brk_pos + 1; } } output += "\u001b[0m"; // Reset.