From 9e4a55d2852f158ea78cb7f00e7e54ecee57c3c4 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sat, 17 Sep 2022 00:33:00 +0800 Subject: [PATCH] util/cfdict_helpers: fix stupid copy & paste errors --- src/util/apple/cfdict_helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/apple/cfdict_helpers.c b/src/util/apple/cfdict_helpers.c index 9da7ca917..e7e4020ac 100644 --- a/src/util/apple/cfdict_helpers.c +++ b/src/util/apple/cfdict_helpers.c @@ -26,7 +26,7 @@ bool ffCfDictGetString(CFMutableDictionaryRef dict, const char* key, FFstrbuf* r bool ffCfDictGetBool(CFMutableDictionaryRef dict, const char* key, bool* result) { CFBooleanRef cf = (CFBooleanRef)ffCfDictGetValue(dict, key); - if(cf == NULL || CFGetTypeID(cf) != CFNumberGetTypeID()) + if(cf == NULL || CFGetTypeID(cf) != CFBooleanGetTypeID()) return false; *result = CFBooleanGetValue(cf); @@ -36,7 +36,7 @@ bool ffCfDictGetBool(CFMutableDictionaryRef dict, const char* key, bool* result) bool ffCfDictGetInt(CFMutableDictionaryRef dict, const char* key, int* result) { CFNumberRef cf = (CFNumberRef)ffCfDictGetValue(dict, key); - if (cf == NULL || CFGetTypeID(cf) != CFStringGetTypeID()) + if (cf == NULL || CFGetTypeID(cf) != CFNumberGetTypeID()) return false; if(!CFNumberGetValue(cf, kCFNumberSInt32Type, result))