diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drone.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; i<chamber->drone_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; } } } |