aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/drm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index bdd0b1e4..50256abd 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1317,8 +1317,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
drm->display);
- strncpy(wlr_conn->output.name, wlr_conn->name,
- sizeof(wlr_conn->output.name) - 1);
+ memcpy(wlr_conn->output.name, wlr_conn->name,
+ sizeof(wlr_conn->output.name));
wlr_conn->output.phys_width = drm_conn->mmWidth;
wlr_conn->output.phys_height = drm_conn->mmHeight;