Skip to content

Commit

Permalink
e131_get_option: wrong inverse conditional used (fixes #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhromic committed May 14, 2018
1 parent 9e0d1fc commit aa1811c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/e131.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ int e131_pkt_init(e131_packet_t *packet, const uint16_t universe, const uint16_t

/* Get the state of a framing option in an E1.31 packet */
bool e131_get_option(const e131_packet_t *packet, const e131_option_t option) {
if (packet == NULL || packet->frame.options & (1 << (option % 8)))
return false;
return true;
if (packet != NULL && packet->frame.options & (1 << (option % 8)))
return true;
return false;
}

/* Set the state of a framing option in an E1.31 packet */
Expand Down

0 comments on commit aa1811c

Please sign in to comment.