From ef7ef1f65641c8bda7fa826a9145eec6d032263b Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 18 May 2016 21:51:46 -0500 Subject: [PATCH] 38513: cast time to long long for printing where possible --- ChangeLog | 4 ++++ Src/Builtins/sched.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6e1f6d1a3..667acf3d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-05-22 Peter Stephenson + + * 38513: Matthew Martin: cast time to long long where possible. + 2015-05-12 Clint Adams * 38482: Completion/Debian/Command/_apt: complete available packages diff --git a/Src/Builtins/sched.c b/Src/Builtins/sched.c index 70625edca..835e72cb7 100644 --- a/Src/Builtins/sched.c +++ b/Src/Builtins/sched.c @@ -353,7 +353,11 @@ schedgetfn(UNUSED(Param pm)) time_t t; t = sch->time; - sprintf(tbuf, "%ld", t); +#if defined(PRINTF_HAS_LLD) + sprintf(tbuf, "%lld", (long long)t); +#else + sprintf(tbuf, "%ld", (long)t); +#endif if (sch->flags & SCHEDFLAG_TRASH_ZLE) flagstr = "-o"; else