Skip to content

Commit

Permalink
Handle nil properites
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Oct 28, 2024
1 parent c5a5106 commit a1cc424
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/arduino/libraries/libraries.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ func (library *Library) MarshalBinary(out io.Writer, prefix *paths.Path) error {
return nil
}
writeProperties := func(in *properties.Map) error {
keys := in.Keys()
var keys []string
if in != nil {
keys = in.Keys()
}
if err := binary.Write(out, binary.NativeEndian, uint16(len(keys))); err != nil {
return err
}
Expand Down

0 comments on commit a1cc424

Please sign in to comment.