diff --git a/src/exec.cpp b/src/exec.cpp index 77c84236f..0613668e8 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -465,9 +465,7 @@ static std::shared_ptr create_output_stream_for_builtin( // Our IO redirection is to an internal buffer, e.g. a command substitution. // We will write directly to it. std::shared_ptr buffer = - // (this is not a dynamic_cast because that needs rtti, - // and we currently use it nowhere else) - ((const io_bufferfill_t *)io.get())->buffer(); + std::static_pointer_cast(io)->buffer(); return make_unique(buffer); }