Fixed a segv happening in non english locale
This commit is contained in:
parent
5690b10635
commit
b72d31b816
@ -1518,10 +1518,13 @@ void handle_device(AMDeviceRef device) {
|
||||
return;
|
||||
}
|
||||
if (device_id != NULL) {
|
||||
if(strcmp(device_id, CFStringGetCStringPtr(found_device_id, CFStringGetSystemEncoding())) == 0) {
|
||||
CFStringRef deviceCFSTR = CFStringCreateWithCString(NULL, device_id, kCFStringEncodingASCII);
|
||||
if (CFStringCompare(deviceCFSTR, found_device_id, kCFCompareCaseInsensitive) == kCFCompareEqualTo) {
|
||||
found_device = true;
|
||||
CFRelease(deviceCFSTR);
|
||||
} else {
|
||||
fprintCFSTR(stdout, CFSTR("Skipping %@.\n"), device_full_name);
|
||||
CFRelease(deviceCFSTR);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user