1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:17:35 +00:00

Shell: Correct FdRedirection inheriting from two RefCounted bases

Also add missing calls to `adopt()`.
This commit is contained in:
AnotherTest 2020-08-04 14:23:23 +04:30 committed by Andreas Kling
parent 12af65c1c9
commit 1d08cab9ab
5 changed files with 32 additions and 22 deletions

View file

@ -698,7 +698,7 @@ int Shell::builtin_shift(int argc, const char** argv)
}
if (!argv_->is_list())
argv_ = *new AST::ListValue({ argv_ });
argv_ = adopt(*new AST::ListValue({ argv_ }));
auto& values = static_cast<AST::ListValue*>(argv_.ptr())->values();
if ((size_t)count > values.size()) {