diff options
author | sebres <sebres@users.sourceforge.net> | 2024-07-16 17:42:58 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-07-16 17:42:58 (GMT) |
commit | 3ce47c5613ef31b0eb6543e2e0b953d50126adc6 (patch) | |
tree | 4d72638459022d2b3c9ffae95943201ae052e41a /generic/tclClockFmt.c | |
parent | c0ed1e355f5b29cc2c58647a6da50aa4ec80f676 (diff) | |
download | tcl-3ce47c5613ef31b0eb6543e2e0b953d50126adc6.zip tcl-3ce47c5613ef31b0eb6543e2e0b953d50126adc6.tar.gz tcl-3ce47c5613ef31b0eb6543e2e0b953d50126adc6.tar.bz2 |
clock: fixed regression [3ee8f1c2a785f4d8]: time overflow (without validation) must cause day increment; clock.test: more regression tests
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r-- | generic/tclClockFmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index c9b30bf..abd55ab 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -1792,7 +1792,7 @@ ClockScnToken_JDN_Proc( fractJD = (int)tok->map->offs /* 0 for calendar or 43200 for astro JD */ + (int)((Tcl_WideInt)SECONDS_PER_DAY * fractJD / fractJDDiv); - if (fractJD > SECONDS_PER_DAY) { + if (fractJD >= SECONDS_PER_DAY) { fractJD %= SECONDS_PER_DAY; intJD += 1; } |