diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-06-02 14:39:39 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-02 14:39:39 +1000 |
| commit | 4b25b4d8e655c5280fd42e5c99f3971ae9b5326b (patch) | |
| tree | 166fa44044ca69bc57e2f64ccb899365ec81df28 /src/boot_O2_g3 | |
| parent | 0261dc0a5c99ab87fed760c0cb81d1f7c4f9dc3b (diff) | |
Misc Cleanup 2 (#1260)
* more misc cleanup
* PR suggestions
* more abs alt, csId
* more cleanup, can't help it
* fix incorrect sq
* more fixes
Diffstat (limited to 'src/boot_O2_g3')
| -rw-r--r-- | src/boot_O2_g3/fault.c | 2 | ||||
| -rw-r--r-- | src/boot_O2_g3/fault_drawer.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/boot_O2_g3/fault.c b/src/boot_O2_g3/fault.c index 6e1656170..eb190859e 100644 --- a/src/boot_O2_g3/fault.c +++ b/src/boot_O2_g3/fault.c @@ -447,7 +447,7 @@ void osSyncPrintfThreadContext(OSThread* t) { OSThread* Fault_FindFaultedThread() { OSThread* iter = __osGetActiveQueue(); while (iter->priority != -1) { - if (iter->priority > 0 && iter->priority < 0x7F && (iter->flags & 3)) { + if ((iter->priority > 0) && (iter->priority < 0x7F) && (iter->flags & 3)) { return iter; } iter = iter->tlnext; diff --git a/src/boot_O2_g3/fault_drawer.c b/src/boot_O2_g3/fault_drawer.c index 8efc930ec..f694be8aa 100644 --- a/src/boot_O2_g3/fault_drawer.c +++ b/src/boot_O2_g3/fault_drawer.c @@ -57,7 +57,7 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col s32 xSize = xEnd - xStart + 1; s32 ySize = yEnd - yStart + 1; - if (xDiff > 0 && yDiff > 0) { + if ((xDiff > 0) && (yDiff > 0)) { if (xDiff < xSize) { xSize = xDiff; } @@ -127,11 +127,11 @@ void FaultDrawer_UpdatePrintColor() { if (sFaultDrawContext->osSyncPrintfEnabled) { osSyncPrintf(VT_RST); idx = FaultDrawer_ColorToPrintColor(sFaultDrawContext->foreColor); - if (idx >= 0 && idx < 8) { + if ((idx >= 0) && (idx < 8)) { osSyncPrintf(VT_SGR("3%d"), idx); } idx = FaultDrawer_ColorToPrintColor(sFaultDrawContext->backColor); - if (idx >= 0 && idx < 8) { + if ((idx >= 0) && (idx < 8)) { osSyncPrintf(VT_SGR("4%d"), idx); } } @@ -180,7 +180,7 @@ void* FaultDrawer_FormatStringFunc(void* arg, const char* str, size_t count) { for (; count != 0; count--, str++) { if (sFaultDrawContext->escCode) { sFaultDrawContext->escCode = false; - if (*str >= '1' && *str <= '9') { + if ((*str >= '1') && (*str <= '9')) { FaultDrawer_SetForeColor(sFaultDrawContext->printColors[*str - '0']); } } else { @@ -192,9 +192,11 @@ void* FaultDrawer_FormatStringFunc(void* arg, const char* str, size_t count) { sFaultDrawContext->cursorX = sFaultDrawContext->w; break; + case '\x1A': sFaultDrawContext->escCode = true; break; + default: if (sFaultDrawContext->osSyncPrintfEnabled) { osSyncPrintf("%c", *str); |
