about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-22 09:59:14 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-22 09:59:14 +0100
commit63274776952b1f388ad28cc6e687048fd690aa9d (patch)
tree3fd9fc66bc6e226198ce461f8325c2afa6616c35 /src/tools
parent4c7ac85ae885b61fe8c30daf9b7aba7886ee3f82 (diff)
downloadbox64-63274776952b1f388ad28cc6e687048fd690aa9d.tar.gz
box64-63274776952b1f388ad28cc6e687048fd690aa9d.zip
Fixed cpu name gathering
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/my_cpuid.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c
index b4bcbcbb..28105808 100644
--- a/src/tools/my_cpuid.c
+++ b/src/tools/my_cpuid.c
@@ -170,10 +170,12 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u)
     if(ncpu>255) ncpu = 255;
     if(!ncpu) ncpu = 1;
     static char branding[3*4*4+1] = "";
-    strcpy(branding, getBoxCpuName());
-    while(strlen(branding)<3*4*4) {
-        memmove(branding+1, branding, strlen(branding));
-        branding[0] = ' ';
+    if(!branding[0]) {
+        strcpy(branding, getBoxCpuName());
+        while(strlen(branding)<3*4*4) {
+            memmove(branding+1, branding, strlen(branding)+1);
+            branding[0] = ' ';
+        }
     }
     switch(tmp32u) {
         case 0x0: