]> sigrok.org Git - pulseview.git/commitdiff
Fix assertions
authorSoeren Apel <redacted>
Thu, 6 Jul 2017 19:55:01 +0000 (21:55 +0200)
committerSoeren Apel <redacted>
Thu, 6 Jul 2017 19:55:01 +0000 (21:55 +0200)
pv/data/analogsegment.cpp
pv/data/decodesignal.cpp

index 0860177e6d9f6139b1ad15053527feeff0ca877b..6dc2b915b30c4683f766bf97da4f662c44a9c07d 100644 (file)
@@ -102,7 +102,7 @@ void AnalogSegment::get_samples(int64_t start_sample, int64_t end_sample,
        assert(start_sample >= 0);
        assert(start_sample < (int64_t)sample_count_);
        assert(end_sample >= 0);
-       assert(end_sample < (int64_t)sample_count_);
+       assert(end_sample <= (int64_t)sample_count_);
        assert(start_sample <= end_sample);
        assert(dest != nullptr);
 
index a57a9a1a9624556d5658dc3d6d3877f160194095..1b06bec942f1c6cc1359cb7ba9c5d853569af339 100644 (file)
@@ -930,7 +930,7 @@ void DecodeSignal::connect_input_notifiers()
 void DecodeSignal::annotation_callback(srd_proto_data *pdata, void *decode_signal)
 {
        assert(pdata);
-       assert(decoder);
+       assert(decode_signal);
 
        DecodeSignal *const ds = (DecodeSignal*)decode_signal;
        assert(ds);