From 881cb5e10238b39d95ddb7a7d82b4758e2436112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Sat, 23 Mar 2024 02:34:07 -0400 Subject: [PATCH] Use use strlcpy() in x_cio.c without the wrapper. Reverts gen_defs/genwrap craziness. --- src/conio/x_cio.c | 4 ++-- src/xpdev/gen_defs.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conio/x_cio.c b/src/conio/x_cio.c index f9262a9670..ff62e95af8 100644 --- a/src/conio/x_cio.c +++ b/src/conio/x_cio.c @@ -107,7 +107,7 @@ void x_setname(const char *name) struct x11_local_event ev = {0}; ev.type=X11_LOCAL_SETNAME; - SAFECOPY(ev.data.name, name); + strlcpy(ev.data.name, name, sizeof(ev.data.name)); write_event(&ev); } @@ -116,7 +116,7 @@ void x_settitle(const char *title) struct x11_local_event ev = {0}; ev.type=X11_LOCAL_SETTITLE; - SAFECOPY(ev.data.title, title); + strlcpy(ev.data.title, title, sizeof(ev.data.title)); write_event(&ev); } diff --git a/src/xpdev/gen_defs.h b/src/xpdev/gen_defs.h index 109ae52e84..ed1d139c66 100644 --- a/src/xpdev/gen_defs.h +++ b/src/xpdev/gen_defs.h @@ -551,6 +551,4 @@ typedef struct { #include <SDL.h> #endif -#include "genwrap.h" // For strlcpy()/strlcat() -- yes, it needs to be down here. - #endif /* Don't add anything after this #endif statement */ -- GitLab