From: Soeren Apel Date: Thu, 6 Jul 2017 19:55:01 +0000 (+0200) Subject: Fix assertions X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b21501d694e68a8c41ea1b7bd1fecd7c7a70eadd;p=pulseview.git Fix assertions --- diff --git a/pv/data/analogsegment.cpp b/pv/data/analogsegment.cpp index 0860177e..6dc2b915 100644 --- a/pv/data/analogsegment.cpp +++ b/pv/data/analogsegment.cpp @@ -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); diff --git a/pv/data/decodesignal.cpp b/pv/data/decodesignal.cpp index a57a9a1a..1b06bec9 100644 --- a/pv/data/decodesignal.cpp +++ b/pv/data/decodesignal.cpp @@ -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);