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

Commit

Permalink
Fix an integer range bug, causing increase to be 0 if acc_minlen == 6…
Browse files Browse the repository at this point in the history
…0000 (e.g. with old log files)

Introduced in commit 9b6f7b6
  • Loading branch information
René Ladan committed Nov 8, 2015
1 parent 90b2f91 commit 45b0a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decode_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ decode_time(uint8_t init_min, uint8_t minlen, uint32_t acc_minlen,
if (prev_toolong)
increase = (int16_t)((acc_minlen - old_acc_minlen) / 60000);
else
increase = (int16_t)acc_minlen / 60000;
increase = (int16_t)(acc_minlen / 60000);
if (acc_minlen >= 60000)
acc_minlen_partial %= 60000;
/* Account for complete minutes with a short acc_minlen: */
Expand Down

0 comments on commit 45b0a91

Please sign in to comment.