diff --git a/c-programming/experiments/clock-malfunction-imitation.c b/c-programming/experiments/clock-malfunction-imitation.c index 38b1b4e..d316d08 100644 --- a/c-programming/experiments/clock-malfunction-imitation.c +++ b/c-programming/experiments/clock-malfunction-imitation.c @@ -50,7 +50,7 @@ time_t clock_change_time(time_t* x) { intmax_plus_1 = (size_t) INT_MAX + 1; for (size_t i = 0; i < max; i++) - y |= (rand() & INT_MAX) * intmax_plus_1; + y |= (rand() % intmax_plus_1) * intmax_plus_1; } else ticks_before_accident--;