From 99cab6d3a72a044b68d25b12b1c406854d2390dd Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 6 Mar 2026 17:11:48 +0100 Subject: [PATCH] Update rtext.c --- src/rtext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rtext.c b/src/rtext.c index c563b1185..1cffd3bb4 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -446,7 +446,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) int charHeight = 0; int j = 0; - while ((lineSpacing + j) < image.height && + while (((lineSpacing + j) < image.height) && !COLOR_EQUAL(pixels[(lineSpacing + j)*image.width + charSpacing], key)) j++; charHeight = j; @@ -470,8 +470,8 @@ Font LoadFontFromImage(Image image, Color key, int firstChar) int charWidth = 0; - while ((xPosToRead + charWidth) < image.width && - !COLOR_EQUAL(pixels[(lineSpacing + (charHeight+lineSpacing)*lineToRead)*image.width + xPosToRead + charWidth], key)) charWidth++; + while (((xPosToRead + charWidth) < image.width) && + !COLOR_EQUAL(pixels[(lineSpacing + (charHeight + lineSpacing)*lineToRead)*image.width + xPosToRead + charWidth], key)) charWidth++; tempCharRecs[index].width = (float)charWidth;