From e0e5cb9ce6e3e43309a43ad3cca8ec8b1a1d6f99 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Tue, 5 Apr 2016 20:51:34 -0700 Subject: small string/RTC code changes --- src/rtc_util.c | 6 +++--- src/string_util.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/rtc_util.c b/src/rtc_util.c index 940b1fea9..876d4ab24 100644 --- a/src/rtc_util.c +++ b/src/rtc_util.c @@ -3,7 +3,7 @@ #include "rtc_util.h" #include "string_util.h" -extern const struct SiiRtcInfo gDefaultRtcInfo; +extern const struct SiiRtcInfo gRtcDummy; extern const s32 gNumDaysInMonths[]; extern u16 gRtcErrorStatus; @@ -133,8 +133,8 @@ u16 RtcGetErrorStatus() void RtcGetInfo(struct SiiRtcInfo *rtc) { - if (gRtcErrorStatus & RTC_ERROR_FLAGS) - *rtc = gDefaultRtcInfo; + if (gRtcErrorStatus & RTC_ERR_FLAG_MASK) + *rtc = gRtcDummy; else RtcGetRawInfo(rtc); } diff --git a/src/string_util.c b/src/string_util.c index a2d2d9cd2..05c415478 100644 --- a/src/string_util.c +++ b/src/string_util.c @@ -317,7 +317,7 @@ u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 } else if (digit != 0 || powerOfSixteen == 1) { - state = 1; + state = WRITING_DIGITS; out = dest++; if (digit <= 0xF) -- cgit v1.2.3