From 3fce0d49e222ac4b5bd9b756f701f3b14b234acf Mon Sep 17 00:00:00 2001 From: yellows8 Date: Fri, 12 Feb 2021 12:33:24 -0500 Subject: [PATCH] time: Fixed signedness issue with time calculation, closes #522. --- nx/source/services/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx/source/services/time.c b/nx/source/services/time.c index 98272fc8..fc0cbcff 100644 --- a/nx/source/services/time.c +++ b/nx/source/services/time.c @@ -159,7 +159,7 @@ static Result _appletCmdNoInOutU32(Service* srv, u32 *out, u32 cmd_id) { } static s64 _timeComputeSteadyClockTimePoint(const TimeStandardSteadyClockTimePointType *context) { - return (context->base_time + armTicksToNs(armGetSystemTick())) / 1000000000L; + return (context->base_time + (s64)armTicksToNs(armGetSystemTick())) / 1000000000L; } Result timeGetStandardSteadyClockTimePoint(TimeSteadyClockTimePoint *out) {