projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daeba21
)
LogicSegment: Check upper bound when performing edge search
author
Soeren Apel
<soeren@apelpie.net>
Mon, 8 Oct 2018 21:54:17 +0000
(23:54 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Mon, 8 Oct 2018 21:54:17 +0000
(23:54 +0200)
pv/data/logicsegment.cpp
patch
|
blob
|
history
diff --git
a/pv/data/logicsegment.cpp
b/pv/data/logicsegment.cpp
index 2f69e02dba3b7acc8794942caf5e26497f6bb930..8f5eab67a6eeaa1d1ca7e7ea6c405b555bed9bfd 100644
(file)
--- a/
pv/data/logicsegment.cpp
+++ b/
pv/data/logicsegment.cpp
@@
-371,6
+371,9
@@
void LogicSegment::get_subsampled_edges(
void LogicSegment::get_surrounding_edges(vector<EdgePair> &dest,
uint64_t origin_sample, float min_length, int sig_index)
{
+ if (origin_sample >= sample_count_)
+ return;
+
// Put the edges vector on the heap, it can become quite big until we can
// use a get_subsampled_edges() implementation that searches backwards
vector<EdgePair>* edges = new vector<EdgePair>;