projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cc0df9
)
LogicSegment: Don't use new/delete in get_unpacked_sample()
author
Soeren Apel
<soeren@apelpie.net>
Wed, 3 Jan 2018 23:30:28 +0000
(
00:30
+0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Tue, 9 Jan 2018 23:34:39 +0000
(
00:34
+0100)
pv/data/logicsegment.cpp
patch
|
blob
|
history
diff --git
a/pv/data/logicsegment.cpp
b/pv/data/logicsegment.cpp
index 62f188e383d4dff662874dce86d975f0ecbdf3a9..38f4bf246c21a619e531be955af26075678c2569 100644
(file)
--- a/
pv/data/logicsegment.cpp
+++ b/
pv/data/logicsegment.cpp
@@
-296,10
+296,11
@@
uint64_t LogicSegment::get_unpacked_sample(uint64_t index) const
{
assert(index < sample_count_);
- uint8_t* data = new uint8_t[unit_size_];
+ assert(unit_size_ <= 8); // 8 * 8 = 64 channels
+ uint8_t data[8];
+
get_raw_samples(index, 1, data);
uint64_t sample = unpack_sample(data);
- delete[] data;
return sample;
}