From f013c6e48dd987b9138a2219f121898022673fd7 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 18 Mar 2020 19:49:23 +0100 Subject: [PATCH] os/date: check the second argument truthy, not the third. --- src/core/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/os.c b/src/core/os.c index 5a674ae2..2451b3ed 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -627,7 +627,7 @@ static Janet os_date(int32_t argc, Janet *argv) { } else { time(&t); } - if (argc >= 2 && janet_truthy(argv[2])) { + if (argc >= 2 && janet_truthy(argv[1])) { /* local time */ #ifdef JANET_WINDOWS localtime_s(&t_infos, &t);