aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2026-06-25 12:00:59 +0200
committerMike Pall <mike>2026-06-25 12:00:59 +0200
commit9d145d2ca3db58493859c495489a0f08f627834f (patch)
tree9108b70ea6199477940589f389ce8a88523d5693
parent7ff85518540617c0f97c4720558bb21c245994a8 (diff)
parent295d45fb26de56498782c94594f31b97aef744ef (diff)
downloadluajit-9d145d2ca3db58493859c495489a0f08f627834f.tar.gz
luajit-9d145d2ca3db58493859c495489a0f08f627834f.tar.bz2
luajit-9d145d2ca3db58493859c495489a0f08f627834f.zip
Merge branch 'master' into v2.1
-rw-r--r--src/lib_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_os.c b/src/lib_os.c
index bf1749151..d91cb976e 100644
--- a/src/lib_os.c
+++ b/src/lib_os.c
@@ -230,6 +230,7 @@ LJLIB_CF(os_date)
230LJLIB_CF(os_time) 230LJLIB_CF(os_time)
231{ 231{
232 time_t t; 232 time_t t;
233 errno = 0;
233 if (lua_isnoneornil(L, 1)) { /* called without args? */ 234 if (lua_isnoneornil(L, 1)) { /* called without args? */
234 t = time(NULL); /* get current time */ 235 t = time(NULL); /* get current time */
235 } else { 236 } else {
@@ -243,7 +244,6 @@ LJLIB_CF(os_time)
243 ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u); 244 ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u);
244 ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u); 245 ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u);
245 ts.tm_isdst = getboolfield(L, "isdst"); 246 ts.tm_isdst = getboolfield(L, "isdst");
246 errno = 0;
247 t = mktime(&ts); 247 t = mktime(&ts);
248 } 248 }
249 if (t == (time_t)(-1) && errno != 0) 249 if (t == (time_t)(-1) && errno != 0)