[console] Fix a signed comparison warning

I'm not sure why that didn't trigger in a linux build. Maybe gcc 12
assumed the result would be positive (I think I'm still using 11 for
mxe).
This commit is contained in:
Bill Currie 2022-09-20 10:50:15 +09:00
parent 474f01d321
commit 11e978b4db

View file

@ -103,7 +103,7 @@ Con_BufferAddText (con_buffer_t *buf, const char *text)
}
if (c == '\n') {
cur_line++;
if (cur_line - buf->lines >= buf->max_lines) {
if ((uint32_t) (cur_line - buf->lines) >= buf->max_lines) {
cur_line -= buf->max_lines;
}
cur_line->text = text_head;