Bugzilla – Full Text Bug Listing |
Summary: | GetInteger overflow | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
Component: | core | Assignee: | Tom Henderson <tomh> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ns-bugs, pdbarnes |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | PC | ||
OS: | Linux |
Description
Tom Henderson
2014-08-26 13:50:21 EDT
Call is to double GetValue (double, double); So force the arguments to double before the addition: return static_cast<uint32_t> ( GetValue (min, max + 1.0) ); Explicitly: return static_cast<uint32_t> ( GetValue ((double)(min), (double)(max) + 1.0) ); fixed in 10935:8c52d989750b |