diff options
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/server.c b/sway/server.c index 567e6ae4..8de9f629 100644 --- a/sway/server.c +++ b/sway/server.c | |||
@@ -214,7 +214,7 @@ bool server_init(struct sway_server *server) { | |||
214 | // Avoid using "wayland-0" as display socket | 214 | // Avoid using "wayland-0" as display socket |
215 | char name_candidate[16]; | 215 | char name_candidate[16]; |
216 | for (int i = 1; i <= 32; ++i) { | 216 | for (int i = 1; i <= 32; ++i) { |
217 | sprintf(name_candidate, "wayland-%d", i); | 217 | snprintf(name_candidate, sizeof(name_candidate), "wayland-%d", i); |
218 | if (wl_display_add_socket(server->wl_display, name_candidate) >= 0) { | 218 | if (wl_display_add_socket(server->wl_display, name_candidate) >= 0) { |
219 | server->socket = strdup(name_candidate); | 219 | server->socket = strdup(name_candidate); |
220 | break; | 220 | break; |