From 81daa7f89527e4bf8cf7ee4fdcec3f642ae508da Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 25 Dec 2025 08:51:41 +0800 Subject: Fixed a format crash issue. --- src/yuescript/yue_ast.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yuescript/yue_ast.cpp b/src/yuescript/yue_ast.cpp index 55b5d03..d85e32e 100644 --- a/src/yuescript/yue_ast.cpp +++ b/src/yuescript/yue_ast.cpp @@ -83,7 +83,11 @@ std::string VarArg_t::to_string(void*) const { return "..."s; } std::string VarArgDef_t::to_string(void* ud) const { - return "..."s + name->to_string(ud); + if (name) { + return "..."s + name->to_string(ud); + } else { + return "..."s; + } } std::string Seperator_t::to_string(void*) const { return {}; -- cgit v1.2.3-55-g6feb