From 58cc761168cbad9de50b3dde5ba6773158e54abe Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Wed, 8 May 2024 17:12:53 -0400 Subject: [PATCH] check for unknown values of states/app types --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.c b/src/main.c index ddb5e20..2111cfa 100644 --- a/src/main.c +++ b/src/main.c @@ -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); @@ -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);