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
I was confused by the - 1, so needed to read the manual and play around a bit. It seems that those calculations can only be applied to other calculated values, not simple numbers.
So an -offset 7 -Round_Up 4 has to be written as -offset - -7 -Round_Up 4
System
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Error
A divide by zero error can occur when providing rounding:
When providing the following as input:
$ srec_cat test.in -offset - 1 -Round_Up 0
$ srec_cat test.in -offset - 1 -Round_Down 0
$ srec_cat test.in -offset - 1 -Round_Nearest 0
In each of the above cases, output will be
Floating point exception (core dumped)
Issue is due to line
multiple = get_number("-round-up");
which is not verified to be non zero. In each of the above cases, immediately following parsing 0, 0 will be used and cause an exception.
The text was updated successfully, but these errors were encountered: