diff options
author | Andrei Lebedev <lebdron@gmail.com> | 2017-09-15 20:55:24 +0800 |
---|---|---|
committer | Kirk Shoop <kirk.shoop@microsoft.com> | 2017-09-16 11:06:49 -0700 |
commit | 1b2e0589f19cb34d8cd58803677701dcf2161876 (patch) | |
tree | 440087d753bd7f1c4fe50929deecfbce269bb095 /Rx | |
parent | b50f4d63365fb95e0662900116bf56654f4a1a0d (diff) | |
download | RxCpp-1b2e0589f19cb34d8cd58803677701dcf2161876.tar.gz |
Fix rxcpp::observable<>::range<T>() when T is unsigned type
Diffstat (limited to 'Rx')
-rw-r--r-- | Rx/v2/src/rxcpp/sources/rx-range.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Rx/v2/src/rxcpp/sources/rx-range.hpp b/Rx/v2/src/rxcpp/sources/rx-range.hpp index d55ffff..c56ee1f 100644 --- a/Rx/v2/src/rxcpp/sources/rx-range.hpp +++ b/Rx/v2/src/rxcpp/sources/rx-range.hpp @@ -86,7 +86,7 @@ struct range : public source_base<T> return; } - if (std::abs(state.last - state.next) < std::abs(state.step)) { + if (std::max(state.last, state.next) - std::min(state.last, state.next) < std::abs(state.step)) { if (state.last != state.next) { dest.on_next(state.last); } |