summaryrefslogtreecommitdiff
path: root/Rx
diff options
context:
space:
mode:
authorAndrei Lebedev <lebdron@gmail.com>2017-09-15 20:55:24 +0800
committerKirk Shoop <kirk.shoop@microsoft.com>2017-09-16 11:06:49 -0700
commit1b2e0589f19cb34d8cd58803677701dcf2161876 (patch)
tree440087d753bd7f1c4fe50929deecfbce269bb095 /Rx
parentb50f4d63365fb95e0662900116bf56654f4a1a0d (diff)
downloadRxCpp-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.hpp2
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);
}