Skip to content

Commit

Permalink
fix(msg): extend byte <> UInt8 conversion to union types
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Feb 29, 2024
1 parent 59d4c93 commit 1d99452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/msg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function trysetproperty!(s::Message, p::Symbol, v)
hasfield(typeof(s), p) || return s
ftype = fieldtype(typeof(s), p)
ftype === Symbol && (v = Symbol(v))
ftype === Vector{UInt8} && v isa Vector{Int8} && (v = reinterpret(UInt8, v))
Vector{UInt8} <: ftype && v isa Vector{Int8} && (v = reinterpret(UInt8, v))
if v === nothing
ftype === Float32 && (v = NaN32)
ftype === Float64 && (v = NaN64)
Expand Down

0 comments on commit 1d99452

Please sign in to comment.