From 11e978b4dbb97feb928fd3b3b5f2ed1268d73787 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 20 Sep 2022 10:50:15 +0900 Subject: [PATCH] [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). --- libs/console/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/console/buffer.c b/libs/console/buffer.c index b484bcfa9..006a2c7bb 100644 --- a/libs/console/buffer.c +++ b/libs/console/buffer.c @@ -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;