Skip to content

Commit 99cab6d

Browse files
committed
Update rtext.c
1 parent 1839b3e commit 99cab6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rtext.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
446446
int charHeight = 0;
447447
int j = 0;
448448

449-
while ((lineSpacing + j) < image.height &&
449+
while (((lineSpacing + j) < image.height) &&
450450
!COLOR_EQUAL(pixels[(lineSpacing + j)*image.width + charSpacing], key)) j++;
451451

452452
charHeight = j;
@@ -470,8 +470,8 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
470470

471471
int charWidth = 0;
472472

473-
while ((xPosToRead + charWidth) < image.width &&
474-
!COLOR_EQUAL(pixels[(lineSpacing + (charHeight+lineSpacing)*lineToRead)*image.width + xPosToRead + charWidth], key)) charWidth++;
473+
while (((xPosToRead + charWidth) < image.width) &&
474+
!COLOR_EQUAL(pixels[(lineSpacing + (charHeight + lineSpacing)*lineToRead)*image.width + xPosToRead + charWidth], key)) charWidth++;
475475

476476
tempCharRecs[index].width = (float)charWidth;
477477

0 commit comments

Comments
 (0)