Browse Source

Fix broken time conversion assert

pull/1226/head
Sami Vaarala 8 years ago
parent
commit
b03468ea91
  1. 2
      src-input/duk_api_time.c

2
src-input/duk_api_time.c

@ -24,7 +24,7 @@ DUK_EXTERNAL void duk_time_to_components(duk_context *ctx, duk_double_t timeval,
duk_bi_date_timeval_to_parts(timeval, parts, dparts, flags);
DUK_ASSERT(comp->month >= 1.0 && comp->month <= 12.0);
DUK_ASSERT(dparts[DUK_DATE_IDX_MONTH] >= 1.0 && dparts[DUK_DATE_IDX_MONTH] <= 12.0);
comp->year = dparts[DUK_DATE_IDX_YEAR];
comp->month = dparts[DUK_DATE_IDX_MONTH] - 1.0;
comp->day = dparts[DUK_DATE_IDX_DAY];

Loading…
Cancel
Save