Skip to content

Commit

Permalink
Update scale check to allow zero
Browse files Browse the repository at this point in the history
Signed-off-by: jwang <jing.j.wang@intel.com>
  • Loading branch information
jwang11 committed Mar 9, 2018
1 parent 13db0da commit 14cc1fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/duration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bounds_check_duration_scale(int64_t dns, double scale, uint64_t max)
Duration
Duration::operator*(double scale) const
{
if (!std::isnormal(scale)) {
if (!std::isfinite(scale)) {
throw std::runtime_error("abnormal scale in rclcpp::Duration");
}
bounds_check_duration_scale(
Expand Down

0 comments on commit 14cc1fc

Please sign in to comment.