diff options
Diffstat (limited to 'darwin/PlatformHelpers.c')
-rw-r--r-- | darwin/PlatformHelpers.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/darwin/PlatformHelpers.c b/darwin/PlatformHelpers.c index 97f0741..a4ea82b 100644 --- a/darwin/PlatformHelpers.c +++ b/darwin/PlatformHelpers.c @@ -103,9 +103,8 @@ double Platform_calculateNanosecondsPerMachTick(void) { * the "Apple M1" chip specifically when running under Rosetta 2. */ - size_t cpuBrandStringSize = 1024; - char cpuBrandString[cpuBrandStringSize]; - Platform_getCPUBrandString(cpuBrandString, cpuBrandStringSize); + char cpuBrandString[1024] = ""; + Platform_getCPUBrandString(cpuBrandString, sizeof(cpuBrandString)); bool isRunningUnderRosetta2 = Platform_isRunningTranslated(); |