input: make sure that a string-bind return value is non-negative

A negative value would lead to misinterpretation by parse_kbinput().

This fixes https://savannah.gnu.org/bugs/?65832.

Bug existed since version 8.0, commit 51c9f727.
This commit is contained in:
Benno Schulenberg 2024-06-03 15:24:22 +02:00
parent 05602e29cd
commit dcbbbf8134

View File

@ -381,7 +381,7 @@ int get_code_from_plantation(void)
return PLANTED_A_COMMAND;
} else {
char *opening = strchr(plants_pointer, '{');
char firstbyte = *plants_pointer;
unsigned char firstbyte = *plants_pointer;
int length;
if (opening) {