Skip to content

Commit 85337c5

Browse files
authored
Merge pull request #5310 from nakagawa-fj/bugfix/identify_cpu_part_for_arm64
Bug Fix: Problem with identifying some ARM64 processors
2 parents f1097d1 + 1dd3960 commit 85337c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpuid_arm64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ int detect(void)
276276
fclose(infile);
277277
}
278278
}
279-
sprintf(cpuimpl,"0x%2x",implementer);
279+
sprintf(cpuimpl,"0x%02x",implementer);
280280
cpu_implementer=strdup(cpuimpl);
281281
}
282282
qsort(cpucores,1024,sizeof(int),cpusort);
283-
sprintf(cpupart,"0x%3x",cpucores[0]);
283+
sprintf(cpupart,"0x%03x",cpucores[0]);
284284
cpu_part=strdup(cpupart);
285285
if(cpu_part != NULL && cpu_implementer != NULL) {
286286
// Arm

0 commit comments

Comments
 (0)