From 8f4656b7920d37b3f1df5944dfe9307264a52f0b Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 13 Jun 2026 17:19:51 +0100 Subject: Reorganised tape files a bit and select one if none selected when patch is hit --- src/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index ee43a3c..c16584c 100644 --- a/src/util.c +++ b/src/util.c @@ -66,6 +66,16 @@ char *StrCopy(const char *source) } +char *SafeStrCopy(char *destination, + const char *source, + size_t destination_size) +{ + strncpy(destination, source, destination_size); + destination[destination_size - 1] = 0; + return destination; +} + + const char *Basename(const char *path) { const char *p=path+strlen(path); -- cgit v1.3