Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit 45b0a91

Browse files
author
René Ladan
committed
Fix an integer range bug, causing increase to be 0 if acc_minlen == 60000 (e.g. with old log files)
Introduced in commit 9b6f7b6
1 parent 90b2f91 commit 45b0a91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

decode_time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ decode_time(uint8_t init_min, uint8_t minlen, uint32_t acc_minlen,
276276
if (prev_toolong)
277277
increase = (int16_t)((acc_minlen - old_acc_minlen) / 60000);
278278
else
279-
increase = (int16_t)acc_minlen / 60000;
279+
increase = (int16_t)(acc_minlen / 60000);
280280
if (acc_minlen >= 60000)
281281
acc_minlen_partial %= 60000;
282282
/* Account for complete minutes with a short acc_minlen: */

0 commit comments

Comments
 (0)