diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 4398f518..f61f5c84 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -785,14 +785,9 @@ static size_t parse_title_format(struct sway_view *view, char *buffer) { | |||
785 | } | 785 | } |
786 | 786 | ||
787 | static char *escape_title(char *buffer) { | 787 | static char *escape_title(char *buffer) { |
788 | int length = escape_markup_text(buffer, NULL, 0); | 788 | size_t length = escape_markup_text(buffer, NULL); |
789 | char *escaped_title = calloc(length + 1, sizeof(char)); | 789 | char *escaped_title = calloc(length + 1, sizeof(char)); |
790 | int result = escape_markup_text(buffer, escaped_title, length); | 790 | escape_markup_text(buffer, escaped_title); |
791 | if (result != length) { | ||
792 | wlr_log(WLR_ERROR, "Could not escape title: %s", buffer); | ||
793 | free(escaped_title); | ||
794 | return buffer; | ||
795 | } | ||
796 | free(buffer); | 791 | free(buffer); |
797 | return escaped_title; | 792 | return escaped_title; |
798 | } | 793 | } |