preventing modulating by 0 in tkch

This commit is contained in:
Václav Šmejkal 2024-11-21 21:00:52 +01:00
parent 6a3f005321
commit 812e31f429
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -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; }