You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect initializer in LogEntry results in empty log entry message.
Tries to cast cbor?["msg"] as CBOR.byteString, but it fails because cbor?["msg"] is of type utf8String.
if case let CBOR.byteString(msg)? = cbor?["msg"] {self.msg = msg}(McuMgrResponse.swift:524)
To fix this, LogEntry.msg should be of type CBOR and the casting should be performed on the getMessage() method, which already has partially the necessary logic to do so and just needs minor adjustments.
I'll submit a PR with a fix.
The text was updated successfully, but these errors were encountered:
Incorrect initializer in
LogEntry
results in empty log entry message.Tries to cast
cbor?["msg"]
asCBOR.byteString
, but it fails becausecbor?["msg"]
is of typeutf8String
.if case let CBOR.byteString(msg)? = cbor?["msg"] {self.msg = msg}
(McuMgrResponse.swift:524)Debugger output:
As such
LogEntry.msg
staysnil
.To fix this,
LogEntry.msg
should be of typeCBOR
and the casting should be performed on thegetMessage()
method, which already has partially the necessary logic to do so and just needs minor adjustments.I'll submit a PR with a fix.
The text was updated successfully, but these errors were encountered: