mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix implicit conversion error (#4684)
This patch fixes the #4682 JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
This commit is contained in:
parent
d97d407eee
commit
6de17b204e
@ -156,12 +156,12 @@ ecma_date_year_from_time (ecma_number_t time) /**< time value */
|
||||
int32_t approx = (int32_t) (floor (time / ECMA_DATE_MS_PER_DAY / 365.2425) + 1970);
|
||||
int64_t year_ms = ecma_date_day_from_year (approx) * ((int64_t) ECMA_DATE_MS_PER_DAY);
|
||||
|
||||
if (year_ms > time)
|
||||
if ((ecma_number_t) year_ms > time)
|
||||
{
|
||||
approx--;
|
||||
}
|
||||
|
||||
if (year_ms + ecma_date_days_in_year (approx) * ((int64_t) ECMA_DATE_MS_PER_DAY) <= time)
|
||||
if ((ecma_number_t) (year_ms + ecma_date_days_in_year (approx) * ((int64_t) ECMA_DATE_MS_PER_DAY)) <= time)
|
||||
{
|
||||
approx++;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user