Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing IP address assignment macro

  • Loading branch information...
commit 3cf237b14d1c34b72b86a2267b5aeb84aaf649a3 1 parent abae909
@asynclabs authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 uip.h
View
4 uip.h
@@ -871,8 +871,8 @@ struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport);
* \hideinitializer
*/
#define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
- ((u16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1)); \
- ((u16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3)); \
+ ((u16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1 & 0x00ff)); \
+ ((u16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3 & 0x00ff)); \
} while(0)
/**
Please sign in to comment.
Something went wrong with that request. Please try again.