sway/criteria: gcc string truncation warning fix

master
Dominique Martinet 7 years ago
parent bf6ca69ae8
commit 720313e185

@ -472,7 +472,9 @@ struct criteria *criteria_parse(char *raw, char **error_arg) {
++head;
}
name = calloc(head - namestart + 1, 1);
if (head != namestart) {
strncpy(name, namestart, head - namestart);
}
// Parse token value
skip_spaces(&head);
value = NULL;

Loading…
Cancel
Save