diff --git a/libcpuid/libcpuid_util.c b/libcpuid/libcpuid_util.c index 6e43c53..95bd2dd 100644 --- a/libcpuid/libcpuid_util.c +++ b/libcpuid/libcpuid_util.c @@ -217,8 +217,11 @@ struct cpu_id_t* get_cached_cpuid(void) static int initialized = 0; static struct cpu_id_t id; if (initialized) return &id; - if (cpu_identify(NULL, &id)) + if (cpu_identify(NULL, &id) != ERR_OK) { memset(&id, 0, sizeof(id)); + id.architecture = ARCHITECTURE_UNKNOWN; + id.vendor = VENDOR_UNKNOWN; + } initialized = 1; return &id; }