mirror of
https://github.com/raysan5/raygui.git
synced 2025-12-25 10:22:33 -05:00
REVIEWED: Out of bounds warning
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user