preventing modulating by 0 in tkch
This commit is contained in:
parent
6a3f005321
commit
812e31f429
@ -34,7 +34,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#include <why2/flags.h>
|
||||
#include <why2/memory.h>
|
||||
|
||||
int mod_cb(int a, int b) { return a % b; }
|
||||
int mod_cb(int a, int b) { return a % (b == 0 ? 1 : b); }
|
||||
int multiply_cb(int a, int b) { return a * b; }
|
||||
int subtract_cb(int a, int b) { return a - b; }
|
||||
int sum_cb(int a, int b) { return a + b; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user