This commit is contained in:
aozhiwei 2024-09-05 16:19:16 +08:00
parent 7b2031a64e
commit 8b81dc8c0d

View File

@ -564,6 +564,9 @@ bool Ability::HasDecAttr(int attr_id)
void Ability::SetSource(AttrHandle handle, int source_type, std::shared_ptr<std::function<std::string()>> cb)
{
if (source_type < kAstNone || source_type >= kAstEnd) {
A8_ABORT();
}
auto p = handle.lock();
p->source_type = source_type;
p->get_source = cb;