fix crash when trying to send chat macro with key ASCII code < '0' (#958)

This commit is contained in:
Roman Fomin 2023-03-25 14:45:42 +07:00 committed by GitHub
parent 44921bfd9a
commit 6323e85a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1843,7 +1843,7 @@ boolean HU_Responder(event_t *ev)
if (altdown)
{
c = c - '0';
if (c > 9)
if (c < 0 || c > 9)
return false;
// fprintf(stderr, "got here\n");
macromessage = chat_macros[c];