You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- change args.min_var_length from uint32_t to int32_t
- change args.max_var_length from uint32_t to int32_t
- change args.max_tol_inserted_length from uint32_t to int32_t
- change args.max_overlap from uint32_t to int32_t
- expand CLI documentation (noting that params need non-negative value)
- expand documentation of all functions accepting these arguments
(noting that it expects a non-negative value)
- explicitly check for non-negative value and terminate if negative
- add test for this check with negative parameter
- replace abs with std::abs in analyze_sa_tag_method.cpp
Reason:
When comparing signed with unsigned values
(e.g. int32 and uint32), C++ implicitly converts the signed
type into an unsigned type which leads to unexpected
behavior (e.g. -1 gets converted to a large positive value).
As a solution, we should not use unsigned types for quantities
on which we might want to perform mathematical operations
or comparisons. To make sure that the parameters do not take
negative values we add an explicit check that terminates the
program if the user gave a negative value.
0 commit comments