diff options
| author | Mike Pall <mike> | 2026-05-25 01:28:03 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2026-05-25 01:28:03 +0200 |
| commit | 5c12243677d2bb97974d634ff172570cea2a37dc (patch) | |
| tree | 89cb18dd9a8f0cce78008c3b2b5e8b73af83169b /src | |
| parent | 75abb0d934fef3e3d5aab46e60e34059ac8a1c08 (diff) | |
| parent | c3b379bf50c8819c61daa3afd9f21d9ec5708bd5 (diff) | |
| download | luajit-5c12243677d2bb97974d634ff172570cea2a37dc.tar.gz luajit-5c12243677d2bb97974d634ff172570cea2a37dc.tar.bz2 luajit-5c12243677d2bb97974d634ff172570cea2a37dc.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib_os.c | 4 | ||||
| -rw-r--r-- | src/lj_carith.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib_os.c b/src/lib_os.c index d6ca70f69..7821fc1fd 100644 --- a/src/lib_os.c +++ b/src/lib_os.c | |||
| @@ -240,8 +240,8 @@ LJLIB_CF(os_time) | |||
| 240 | ts.tm_min = getfield(L, "min", 0); | 240 | ts.tm_min = getfield(L, "min", 0); |
| 241 | ts.tm_hour = getfield(L, "hour", 12); | 241 | ts.tm_hour = getfield(L, "hour", 12); |
| 242 | ts.tm_mday = getfield(L, "day", -1); | 242 | ts.tm_mday = getfield(L, "day", -1); |
| 243 | ts.tm_mon = getfield(L, "month", -1) - 1; | 243 | ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u); |
| 244 | ts.tm_year = getfield(L, "year", -1) - 1900; | 244 | ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u); |
| 245 | ts.tm_isdst = getboolfield(L, "isdst"); | 245 | ts.tm_isdst = getboolfield(L, "isdst"); |
| 246 | t = mktime(&ts); | 246 | t = mktime(&ts); |
| 247 | } | 247 | } |
diff --git a/src/lj_carith.c b/src/lj_carith.c index 12c3ced28..cb408fb80 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c | |||
| @@ -135,7 +135,7 @@ static int carith_ptr(lua_State *L, CTState *cts, CDArith *ca, MMS mm) | |||
| 135 | return 0; | 135 | return 0; |
| 136 | lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ca->ct[1], | 136 | lj_cconv_ct_ct(cts, ctype_get(cts, CTID_INT_PSZ), ca->ct[1], |
| 137 | (uint8_t *)&idx, ca->p[1], 0); | 137 | (uint8_t *)&idx, ca->p[1], 0); |
| 138 | if (mm == MM_sub) idx = -idx; | 138 | if (mm == MM_sub) idx = (ptrdiff_t)(~(uintptr_t)idx+1u); |
| 139 | } else if (mm == MM_add && ctype_isnum(ctp->info) && | 139 | } else if (mm == MM_add && ctype_isnum(ctp->info) && |
| 140 | (ctype_isptr(ca->ct[1]->info) || ctype_isrefarray(ca->ct[1]->info))) { | 140 | (ctype_isptr(ca->ct[1]->info) || ctype_isrefarray(ca->ct[1]->info))) { |
| 141 | /* Swap pointer and index. */ | 141 | /* Swap pointer and index. */ |
