diff --git a/Marlin/src/lcd/anycubic_serial.cpp b/Marlin/src/lcd/anycubic_serial.cpp index cb084925..a63f0ca5 100755 --- a/Marlin/src/lcd/anycubic_serial.cpp +++ b/Marlin/src/lcd/anycubic_serial.cpp @@ -66,7 +66,7 @@ ring_buffer tx_buffer_ajg = {{0}, 0, 0}; inline void store_char(unsigned char c, ring_buffer *buffer) { - int i = (unsigned int)(buffer->head + 1) % SERIAL_BUFFER_SIZE; + unsigned int i = ((unsigned int)(buffer->head + 1)) % SERIAL_BUFFER_SIZE; // if we should be storing the received character into the location // just before the tail (meaning that the head would advance to the