From e122a1680418e6db3a6ebbaa6e571f4a39dceaac Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 30 Oct 2024 14:26:25 +0100 Subject: [PATCH] 2dlib: Fix integer signedness missmatch in comparison in font.cpp --- 2dlib/font.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/2dlib/font.cpp b/2dlib/font.cpp index 5618661f..adaa36f8 100644 --- a/2dlib/font.cpp +++ b/2dlib/font.cpp @@ -168,15 +168,12 @@ inline int READ_FONT_DATA(FONTFILE ffile, void *buf, int size, int nelem) { } inline FONTFILE OPEN_FONT(const char *filename, bool &success) { - FONTFILE fp; - int file_id; - success = false; - fp = (FONTFILE)cfopen(filename, "rb"); + FONTFILE fp = (FONTFILE)cfopen(filename, "rb"); if (!fp) return NULL; - file_id = READ_FONT_INT(fp); + uint32_t file_id = READ_FONT_INT(fp); if (file_id != 0xfeedbaba) return (FONTFILE)(-1);