sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit acf71fe8053efadbfb81d2ea010ac6facf41cd81
parent 231c72a141fbf2bfd5c42413fe171f596a2ec42a
Author: emersion <contact@emersion.fr>
Date:   Fri,  8 Jun 2018 14:41:33 +0100

Merge pull request #2119 from martinetd/gcc-strtruncation

sway/criteria: gcc string truncation warning fix
Diffstat:
Msway/criteria.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

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