From ce42af48580e1f9aec6ab964bdba9485090f8a94 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 26 Feb 2022 16:32:53 +0100 Subject: [PATCH] Update raygui.h --- src/raygui.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/raygui.h b/src/raygui.h index 7405a2b..998d804 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -3703,15 +3703,13 @@ bool GuiCheckIconPixel(int iconId, int x, int y) static int GetTextWidth(const char *text) { Vector2 size = { 0 }; - - int textSize = TextLength(text); int textIconOffset = 0; if ((text != NULL) && (text[0] != '\0')) { if (text[0] == '#') { - for (int i = 1; (text[i] != NULL) && (i < 5); i++) + for (int i = 1; (text[i] != '\0') && (i < 5); i++) { if (text[i] == '#') {