]> sigrok.org Git - pulseview.git/commit
StoreSession: Observe proper range order
authorSoeren Apel <redacted>
Thu, 5 Nov 2015 18:14:46 +0000 (19:14 +0100)
committerUwe Hermann <redacted>
Thu, 5 Nov 2015 20:36:19 +0000 (21:36 +0100)
commit3e8a7cc6af5558a249c114b1609ececa2a381774
tree57a31df1b38c0ec0628d1e0aa0fe067cb515af71
parent48257a69ffad409c9893605d99cd6e15161dff4f
StoreSession: Observe proper range order

When I wrote the original solution I wanted min() and abs()
to take care of this issue. However, I forgot that abs()
works on a difference of two uint64_t, so this subtraction
will underflow if the range is in the wrong order.
Converting them to int64_t isn't a good solution, so I'm now
using an ordinary condition instead.
pv/storesession.cpp