• David Flynn's avatar
    Fix date_Increment when i_divider_den > 1 · 8ee69aa0
    David Flynn authored
    Previously, calling date_Increment(d,1) with divider_den > 1 would cause:
     - Uncorrectable rounding error due to ordering of / followed by *
     - If i_divider_num / i_divider_den is not integral, a remainder is
       accumulated, but not divided by i_divider_num when added to date.
     => Both cases are evident with num=30000, den=1001.
    This fixes both issues.
    Signed-off-by: default avatarDavid Flynn <davidf@rd.bbc.co.uk>
mtime.c 16 KB