Skip to content

Commit

Permalink
check for unknown values of states/app types
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzSwirlz committed May 8, 2024
1 parent 131aa2c commit 58cc761
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro
case OS_THREAD_TYPE_APP:
snprintf(typeText, 30, "Type: App");
break;
default:
snprintf(typeText, 30, "Type Undefined: %d", threads[i]->type);
break;
}
if (WUPSConfigItemStub_AddToCategory(catHandle, typeText) != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Failed to add type of thread %d to its category", threads[i]->type);
Expand Down Expand Up @@ -139,6 +142,9 @@ WUPSConfigAPICallbackStatus ConfigMenuOpenedCallback(WUPSConfigCategoryHandle ro
case OS_THREAD_STATE_MORIBUND:
snprintf(stateText, 50, "State: Moribund");
break;
default:
snprintf(stateText, 50, "State Undefined: %d", threads[i]->state);
break;
}
if (WUPSConfigItemStub_AddToCategory(catHandle, stateText) != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Failed to add state of thread %d to its category", threads[i]->state);
Expand Down

0 comments on commit 58cc761

Please sign in to comment.