Skip to content

Commit bc65df7

Browse files
committed
Revert character code from core foundation to UInt8
I changed it to UInt16 to account for certain characters in the previous commit, but I am unsure characters that are more than 8 bits are allowed in paths. I should think about this further, however perhaps something to consider while I am working on #5
1 parent ddd69b1 commit bc65df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/darwin.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ end
7171
# https://developer.apple.com/documentation/corefoundation/1542730-cfstringgetcharacteratindex
7272
function _cfstring_get_character_at_index(cfstr::Cstring, idx::T) where {T <: Integer}
7373
# UniChar CFStringGetCharacterAtIndex(CFStringRef theString, CFIndex idx);
74-
return Char(ccall(:CFStringGetCharacterAtIndex, UInt16, (Cstring, UInt32), cfstr, idx))
74+
return Char(ccall(:CFStringGetCharacterAtIndex, UInt8, (Cstring, UInt32), cfstr, idx))
7575
end
7676

7777
# https://github.com/vovkasm/input-source-switcher/blob/c5bab3de716db5e3dae3703ed3b72f2bf1cd51d3/utils.cpp#L9-L18

0 commit comments

Comments
 (0)