Commit 6733535f authored by sirlemonhead's avatar sirlemonhead
Browse files

SW: Don't allow backspacing on an empty text input buffer

parent 73aac5b2
......@@ -2583,7 +2583,11 @@ MNU_InputSmallString(char *name, short pix_width)
if (ch == ascii_backspace)
{
name[strlen(name) - 1] = '\0';
size_t const namelen = strlen(name);
if (namelen > 0)
{
name[namelen - 1] = '\0';
}
continue;
}
else if (ch == ascii_esc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment