Skip to content

Commit

Permalink
Fix crash when VTParameters subspan is out of range.
Browse files Browse the repository at this point in the history
  • Loading branch information
j4james committed Apr 25, 2023
1 parent 2cfd73d commit 882adae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/terminal/adapter/DispatchTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace Microsoft::Console::VirtualTerminal

VTParameters subspan(const size_t offset) const noexcept
{
const auto subValues = _values.subspan(offset);
const auto subValues = _values.subspan(std::min(offset, _values.size()));
return { subValues.data(), subValues.size() };
}

Expand Down

0 comments on commit 882adae

Please sign in to comment.