2
0
forked from Ivasoft/DSView

fix assert fail of mouse measure when capture count less than set sample count

This commit is contained in:
DreamSourceLab
2015-05-03 19:13:23 +08:00
parent c2724b765c
commit a4e991f181

View File

@@ -288,7 +288,7 @@ bool LogicSignal::measure(const QPointF &p, uint64_t &index0, uint64_t &index1,
return false;
uint64_t index = _data->samplerate() * (_view->offset() - _data->get_start_time() + p.x() * _view->scale());
if (index == 0)
if (index == 0 || index >= (snapshot->get_sample_count() - 1))
return false;
const uint64_t sig_mask = 1ULL << get_index();