diff options
-rw-r--r-- | sway/criteria.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 2fa9878b..9077aa9b 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -366,9 +366,9 @@ static char *get_focused_prop(enum criteria_token token) { | |||
366 | return NULL; | 366 | return NULL; |
367 | } | 367 | } |
368 | size_t id = view->swayc->id; | 368 | size_t id = view->swayc->id; |
369 | int len = snprintf(NULL, 0, "%zu", id) + 1; | 369 | size_t id_size = snprintf(NULL, 0, "%zu", id) + 1; |
370 | char *id_str = malloc(len); | 370 | char *id_str = malloc(id_size); |
371 | snprintf(id_str, len, "%zu", id); | 371 | snprintf(id_str, id_size, "%zu", id); |
372 | value = id_str; | 372 | value = id_str; |
373 | break; | 373 | break; |
374 | case T_CON_MARK: // These do not support __focused__ | 374 | case T_CON_MARK: // These do not support __focused__ |