summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}