c-message-queue icon indicating copy to clipboard operation
c-message-queue copied to clipboard

uint16_t i = (p_queue->write_idx)++ & (capacity - 1); => uint16_t i = (p_queue->write_idx)++ % capacity ;

Open wsd1 opened this issue 1 year ago • 0 comments
trafficstars

If capacity not equal to 2\4\8\16\32... there will be some issues here.

wsd1 avatar Feb 26 '24 01:02 wsd1