Skip to content

Commit 81daa7f

Browse files
committed
Fixed a format crash issue.
1 parent 7ee395d commit 81daa7f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/yuescript/yue_ast.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ std::string VarArg_t::to_string(void*) const {
8383
return "..."s;
8484
}
8585
std::string VarArgDef_t::to_string(void* ud) const {
86-
return "..."s + name->to_string(ud);
86+
if (name) {
87+
return "..."s + name->to_string(ud);
88+
} else {
89+
return "..."s;
90+
}
8791
}
8892
std::string Seperator_t::to_string(void*) const {
8993
return {};

0 commit comments

Comments
 (0)