Merge branch 'master' into v2.1
This commit is contained in:
commit
5c12243677
@ -240,8 +240,8 @@ LJLIB_CF(os_time)
|
||||
ts.tm_min = getfield(L, "min", 0);
|
||||
ts.tm_hour = getfield(L, "hour", 12);
|
||||
ts.tm_mday = getfield(L, "day", -1);
|
||||
ts.tm_mon = getfield(L, "month", -1) - 1;
|
||||
ts.tm_year = getfield(L, "year", -1) - 1900;
|
||||
ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u);
|
||||
ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u);
|
||||
ts.tm_isdst = getboolfield(L, "isdst");
|
||||
t = mktime(&ts);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ static int carith_ptr(lua_State *L, CTState *cts, CDArith *ca, MMS mm)
|
||||
return 0;
|
||||
lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ca->ct[1],
|
||||
(uint8_t *)&idx, ca->p[1], 0);
|
||||
if (mm == MM_sub) idx = -idx;
|
||||
if (mm == MM_sub) idx = (ptrdiff_t)(~(uintptr_t)idx+1u);
|
||||
} else if (mm == MM_add && ctype_isnum(ctp->info) &&
|
||||
(ctype_isptr(ca->ct[1]->info) || ctype_isrefarray(ca->ct[1]->info))) {
|
||||
/* Swap pointer and index. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user