time: Fixed signedness issue with time calculation, closes #522.

This commit is contained in:
yellows8 2021-02-12 12:33:24 -05:00
parent c71cd80bcf
commit 3fce0d49e2
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43

View File

@ -159,7 +159,7 @@ static Result _appletCmdNoInOutU32(Service* srv, u32 *out, u32 cmd_id) {
} }
static s64 _timeComputeSteadyClockTimePoint(const TimeStandardSteadyClockTimePointType *context) { 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) { Result timeGetStandardSteadyClockTimePoint(TimeSteadyClockTimePoint *out) {