XQuartz: *REALLY* use CFStringCreateWithCString
I need sleep! Why am I making these stupid mistakes... sorry for pointless commit spam. ugg. (cherry picked from commit b16351fc6457aabead328472d16dc25789032940)
This commit is contained in:
parent
5dd895efa3
commit
beb29c605b
|
@ -104,7 +104,7 @@ static char *command_from_prefs(const char *key, const char *default_value) {
|
||||||
CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication);
|
CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication);
|
||||||
|
|
||||||
if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
|
if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) {
|
||||||
CFStringRef cfDefaultValue = CFStringCreateWithPascalString(NULL, default_value, kCFStringEncodingASCII);
|
CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII);
|
||||||
|
|
||||||
CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
|
CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication);
|
||||||
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
||||||
|
|
Loading…
Reference in New Issue