mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 01:04:26 +08:00
Add a paranoid assert to io_chain_t::append
This commit is contained in:
parent
f2093aef43
commit
424c56006d
@ -215,6 +215,7 @@ void io_chain_t::push_back(shared_ptr<io_data_t> element) {
|
||||
}
|
||||
|
||||
void io_chain_t::append(const io_chain_t &chain) {
|
||||
assert(&chain != this && "Cannot append self to self");
|
||||
this->insert(this->end(), chain.begin(), chain.end());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user