Bugfix/bacaddr dnet only init (#570)

* Fixed bacnet_address_init() when setting only the dnet value.

* Fixed MSVC snprintf from C99
This commit is contained in:
Steve Karg
2024-02-08 16:39:49 -06:00
committed by GitHub
parent 58c19ebd2a
commit 7eedaa406d
3 changed files with 47 additions and 5 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ bool bacnet_address_init(BACNET_ADDRESS *dest,
for (i = 0; i < MAX_MAC_LEN; i++) {
dest->mac[i] = 0;
}
dest->mac_len = mac->len;
dest->mac_len = 0;
for (i = 0; i < MAX_MAC_LEN; i++) {
dest->adr[i] = 0;
}