This commit is contained in:
Igor Pavlov
2021-07-22 23:00:14 +01:00
committed by Kornel
parent 4a960640a3
commit 585698650f
619 changed files with 34904 additions and 10859 deletions

View File

@@ -33,7 +33,7 @@ namespace NMub {
#define MACH_CPU_TYPE_AMD64 (MACH_CPU_ARCH_ABI64 | MACH_CPU_TYPE_386)
#define MACH_CPU_TYPE_ARM64 (MACH_CPU_ARCH_ABI64 | MACH_CPU_TYPE_ARM)
#define MACH_CPU_SUBTYPE_LIB64 (1 << 31)
#define MACH_CPU_SUBTYPE_LIB64 ((UInt32)1 << 31)
#define MACH_CPU_SUBTYPE_I386_ALL 3
@@ -124,14 +124,15 @@ STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *val
}
if (ext)
strcpy(temp, ext);
if (item.SubType != 0 && (
item.Type != MACH_CPU_TYPE_386 &&
item.Type != MACH_CPU_TYPE_AMD64 ||
(item.SubType & ~(UInt32)MACH_CPU_SUBTYPE_LIB64) != MACH_CPU_SUBTYPE_I386_ALL))
if (item.SubType != 0)
if ((item.Type != MACH_CPU_TYPE_386 &&
item.Type != MACH_CPU_TYPE_AMD64)
|| (item.SubType & ~(UInt32)MACH_CPU_SUBTYPE_LIB64) != MACH_CPU_SUBTYPE_I386_ALL
)
{
unsigned pos = MyStringLen(temp);
temp[pos++] = '-';
ConvertUInt32ToString(item.SubType, temp + pos);
ConvertUInt32ToString(item.SubType, temp + pos);
}
return PropVarEm_Set_Str(value, temp);
}