Jeffrey Smith (@whydoubt) commented about dlls/advapi32/lsa.c:
- "PolicyReplicaSourceInformation",
- "PolicyDefaultQuotaInformation",
- "PolicyModificationInformation",
- "PolicyAuditFullSetInformation",
- "PolicyAuditFullQueryInformation",
- "PolicyDnsDomainInformation",
- "PolicyDnsDomainInformationInt",
- "PolicyLocalAccountDomainInformation",
- "PolicyMachineAccountInformation",
- "PolicyMachineAccountInformation2",
- "PolicyLastEntry"
+};
+static LPCSTR debugstr_InformationClass(IN POLICY_INFORMATION_CLASS InformationClass) +{
- if (InformationClass >= ARRAY_SIZE(string_InformationClass))
Compilers can (and at least some do) treat an enumeration as a _signed_ integer. For the comparison to work as desired you'll want to cast `InformationClass` to an unsigned type. I think `size_t` would be appropriate.