mirror of
https://github.com/swaywm/sway.git
synced 2025-01-23 17:26:41 +00:00
commands: better type for con_id string length
This commit is contained in:
parent
69e1a421fc
commit
3a980857cb
|
@ -366,9 +366,9 @@ static char *get_focused_prop(enum criteria_token token) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
size_t id = view->swayc->id;
|
size_t id = view->swayc->id;
|
||||||
int len = snprintf(NULL, 0, "%zu", id) + 1;
|
size_t id_size = snprintf(NULL, 0, "%zu", id) + 1;
|
||||||
char *id_str = malloc(len);
|
char *id_str = malloc(id_size);
|
||||||
snprintf(id_str, len, "%zu", id);
|
snprintf(id_str, id_size, "%zu", id);
|
||||||
value = id_str;
|
value = id_str;
|
||||||
break;
|
break;
|
||||||
case T_CON_MARK: // These do not support __focused__
|
case T_CON_MARK: // These do not support __focused__
|
||||||
|
|
Loading…
Reference in a new issue