From 8f1ec053effccbba951d39b92accaa13114da9e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 27 Jan 2020 08:50:29 +0530 Subject: [PATCH] ... --- glfw/wl_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 2c32adf1bd9..8d32cf8403b 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -960,7 +960,8 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) window->wl.title = _glfw_strdup(title); // Wayland cannot handle requests larger than ~8200 bytes. Sending // on causes an abort(). Since titles this large are meaningless anyway - // ensure they do not happen. + // ensure they do not happen. One should really truncate ensuring valid UTF-8 + // but I cant be bothered. if (title && strnlen(title, 2048) >= 2048) window->wl.title[2048] = 0; if (window->wl.xdg.toplevel) xdg_toplevel_set_title(window->wl.xdg.toplevel, window->wl.title);