diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 0aee0d42..c016bfa2 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -564,6 +564,9 @@ bool Ability::HasDecAttr(int attr_id) void Ability::SetSource(AttrHandle handle, int source_type, std::shared_ptr> cb) { + if (source_type < kAstNone || source_type >= kAstEnd) { + A8_ABORT(); + } auto p = handle.lock(); p->source_type = source_type; p->get_source = cb;