Skip to content

Commit

Permalink
fix(msg): handle Java signed byte conversion to Julia UInt8
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Feb 16, 2024
1 parent e0d494c commit 8e815c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/msg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +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))
if v === nothing
ftype === Float32 && (v = NaN32)
ftype === Float64 && (v = NaN64)
Expand Down

0 comments on commit 8e815c1

Please sign in to comment.