mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Prevent out-of-bounds access.
This fixes the issue when assembly view is scrolled to the bottom of the screen and display scale is reduced by the user. In such case clipper will report DisplayStart to be at the end element, which would cause out-of-bounds access to the m_asm array. Clipper self-fixes this in the next frame, so this workaround is enough.
This commit is contained in:
parent
c23abca979
commit
dd8083e0ee
@ -2226,7 +2226,7 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
|
||||
insList.emplace_back( line.addr );
|
||||
}
|
||||
}
|
||||
if( m_showJumps && !m_jumpTable.empty() )
|
||||
if( m_showJumps && !m_jumpTable.empty() && clipper.DisplayStart != clipper.DisplayEnd )
|
||||
{
|
||||
auto draw = ImGui::GetWindowDrawList();
|
||||
const auto ts = ImGui::CalcTextSize( " " );
|
||||
|
Loading…
x
Reference in New Issue
Block a user