Skip to content

Commit

Permalink
Fix a bitwise instead of logical warning
Browse files Browse the repository at this point in the history
  • Loading branch information
spinicist committed Jan 9, 2024
1 parent c19a715 commit a66c1e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/notcurses/notcurses.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ ncchannel_set_palindex(uint32_t* channel, unsigned idx){
static inline bool
ncchannel_rgb_p(uint32_t channel){
// bitwise or is intentional (allows compiler more freedom)
return !(ncchannel_default_p(channel) | ncchannel_palindex_p(channel));
return !(ncchannel_default_p(channel) || ncchannel_palindex_p(channel));
}

// Extract the 8-bit red component from a 32-bit channel. Only valid if
Expand Down

0 comments on commit a66c1e9

Please sign in to comment.