From 06d12a039c2b6d0da93caa758819c0dc45212e57 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 10 Mar 2022 15:29:31 -0500 Subject: It's really hard to keep it together It's really hard to keep it together when you're testing this stuff on yourself @_@ --- src/drone.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/drone.c b/src/drone.c index a4b1496..8b47b10 100644 --- a/src/drone.c +++ b/src/drone.c @@ -271,6 +271,9 @@ static void max_speech_duration(xas_drone_chamber *chamber, struct timeval *max) { size_t i; + max->tv_sec = 0; + max->tv_usec = 0; + for (i=0; idrone_count; i++) { xas_drone *drone = chamber->drones[i]; xas_bank_player *player = (xas_bank_player *)drone->obj->ctx; @@ -282,8 +285,8 @@ static void max_speech_duration(xas_drone_chamber *chamber, &duration); if (timercmp(&duration, max, >)) { - duration.tv_sec = max->tv_sec; - duration.tv_usec = max->tv_usec; + max->tv_sec = duration.tv_sec; + max->tv_usec = duration.tv_usec; } } } -- cgit v1.2.3