flag loop that has slightly subtle logic

This commit is contained in:
Vern Paxson 2021-08-19 10:58:03 -07:00
parent d58573adb1
commit bd7edd27fd

View file

@ -155,8 +155,11 @@ bool ZAMCompiler::RemoveDeadCode()
bool did_removal = false;
for ( auto& i0 : insts1 )
// Note, loops up to the last instruction but not including it.
for ( unsigned int i = 0; i < insts1.size() - 1; ++i )
{
auto& i0 = insts1[i];
if ( ! i0->live )
continue;