summaryrefslogtreecommitdiffhomepage
path: root/dev/libDDK/src/ddk_str.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-09-28 14:18:55 +0200
committerGitHub <noreply@github.com>2025-09-28 14:18:55 +0200
commit643fd1890646442e97f61c323bb1342ccae8c46b (patch)
tree1dccc97ea6d52012d682f664995959fe7db9ddd1 /dev/libDDK/src/ddk_str.c
parentdfad97487744840f26ea8046d1a011688bd9edd0 (diff)
parent2d673e164b98db5eb08d4c41c6225fbe73ee82d7 (diff)
Merge pull request #66 from 0xf00sec/patch-2
feat: `T.Value` (ErrorOr.h)
Diffstat (limited to 'dev/libDDK/src/ddk_str.c')
-rw-r--r--dev/libDDK/src/ddk_str.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dev/libDDK/src/ddk_str.c b/dev/libDDK/src/ddk_str.c
index 514cddc7..1e2fde19 100644
--- a/dev/libDDK/src/ddk_str.c
+++ b/dev/libDDK/src/ddk_str.c
@@ -23,6 +23,8 @@ DDK_EXTERN size_t kstrlen(const char* in) {
}
DDK_EXTERN int kstrncpy(char* dst, const char* src, size_t len) {
+ if (nil == dst || nil == src) return 0;
+
size_t index = 0;
while (index != len) {