mirror of
https://github.com/janet-lang/janet
synced 2025-10-21 10:47:40 +00:00
Fix os/date with nil argument.
This commit is contained in:
@@ -1324,7 +1324,7 @@ JANET_CORE_FN(os_date,
|
|||||||
time_t t;
|
time_t t;
|
||||||
struct tm t_infos;
|
struct tm t_infos;
|
||||||
struct tm *t_info = NULL;
|
struct tm *t_info = NULL;
|
||||||
if (argc) {
|
if (argc && !janet_checktype(argv[0], JANET_NIL)) {
|
||||||
int64_t integer = janet_getinteger64(argv, 0);
|
int64_t integer = janet_getinteger64(argv, 0);
|
||||||
t = (time_t) integer;
|
t = (time_t) integer;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user