This commit is contained in:
Sebastian Ramacher 2020-03-09 21:15:27 +01:00
parent 76bc4638b8
commit 88e7c7afe8

View file

@ -122,20 +122,15 @@ cmd_marks_add(girara_session_t* session, girara_list_t* argument_list)
return false;
}
char* key_string = girara_list_nth(argument_list, 0);
const char* key_string = girara_list_nth(argument_list, 0);
if (key_string == NULL) {
if (key_string == NULL || strlen(key_string) != 1) {
return false;
}
if (strlen(key_string) != 1) {
return false;
}
char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) || (key >=
0x61 && key <= 0x7A)) == false) {
const char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) ||
(key >= 0x61 && key <= 0x7A)) == false) {
return false;
}