summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2026-06-13 17:19:51 +0100
committerIan C <ianc@noddybox.co.uk>2026-06-13 17:19:51 +0100
commit8f4656b7920d37b3f1df5944dfe9307264a52f0b (patch)
treee5540480b3e8aced36c7c1f738f90d26c685e103 /src/util.c
parent24a7e3ac0103979dcef910f0b87f3eea234d2353 (diff)
Reorganised tape files a bit and select one if none selected when patch is hit
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c10
1 files changed, 10 insertions, 0 deletions
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);