Fix the encoding of network port number for BACnet IP (#147)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-01-14 00:00:27 -06:00
committed by GitHub
parent 69f876f1c9
commit 80114088f9
+1 -1
View File
@@ -602,7 +602,7 @@ bool Network_Port_MAC_Address(
&ip_mac[0], &Object_List[index].Network.IPv4.IP_Address, 4);
/* convert port from host-byte-order to network-byte-order */
encode_unsigned16(&ip_mac[4],
&Object_List[index].Network.IPv4.Port);
Object_List[index].Network.IPv4.Port);
mac = &ip_mac[0];
mac_len = sizeof(ip_mac);
break;