REVIEWED: Out of bounds warning

This commit is contained in:
Ray
2025-11-18 20:59:05 +01:00
parent 773d1ec52b
commit 3aea427fc8

View File

@ -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();