From 3aea427fc80dfc7e9039c25890dae49e2005c804 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 18 Nov 2025 20:59:05 +0100 Subject: [PATCH] REVIEWED: Out of bounds warning --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index 463fd44..acdab83 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -3087,7 +3087,7 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in } // Add new digit to text value - if ((keyCount < RAYGUI_VALUEBOX_MAX_CHARS) && (GuiGetTextWidth(textValue) < bounds.width)) + if ((keyCount >= 0) && (keyCount < RAYGUI_VALUEBOX_MAX_CHARS) && (GuiGetTextWidth(textValue) < bounds.width)) { int key = GetCharPressed();