diff --git a/src/create_pcid.c b/src/create_pcid.c index 701d594ef99483e8d68b1457f48f7004e183b4a2..fbc8b726eeda277eda3b8943f4d99461f11ec280 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -54,7 +54,12 @@ int32_t SetOsSyscap(PCIDMain *pcidBuffer, uint32_t osCapSize, return -1; } osCapIndex = cJSON_GetObjectItem(allOsSyscapObj, jsonArrayItem->valuestring); - if (osCapIndex == NULL || !cJSON_IsNumber(osCapIndex)) { + if (osCapIndex == NULL) { + PRINT_ERR("can't find ths syscap: %s, please add it syscap_define.h.\n", jsonArrayItem->valuestring); + return -1; + } + + if (!cJSON_IsNumber(osCapIndex)) { PRINT_ERR("Get osCapIndex failed."); return -1; }