X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Flogicdatasnapshot.cpp;h=1799c2f418f14daf27670d9f06b4b8549442ac8a;hp=b78047d761ca29c351c1300230aa94553cf5434b;hb=f82670ace2243d3d9004833995cf1030accd8e35;hpb=60b0c2daf2291a8358e3905515c1dfa47956590f diff --git a/pv/logicdatasnapshot.cpp b/pv/logicdatasnapshot.cpp index b78047d7..1799c2f4 100644 --- a/pv/logicdatasnapshot.cpp +++ b/pv/logicdatasnapshot.cpp @@ -206,8 +206,7 @@ void LogicDataSnapshot::get_subsampled_edges( const uint64_t final_index = min(end, pow2_ceil(index, MipMapScalePower)); - for(index; - index < final_index && + for(; index < final_index && (index & ~(~0 << MipMapScalePower)) != 0; index++) { @@ -312,7 +311,7 @@ void LogicDataSnapshot::get_subsampled_edges( // do a linear search for the next transition within the // block if(min_length < MipMapScaleFactor) { - for(index; index < end; index++) { + for(; index < end; index++) { const bool sample = (get_sample(index) & sig_mask) != 0; if(sample != last_sample)