summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
committerpommicket <pommicket@gmail.com>2023-08-14 12:59:35 -0300
commitefe5ae8cec7221779b9a6395eeb9b10b8974dd44 (patch)
tree4fd8162d810cf0a6e11a8d2505b6eabcb6a8e1c6 /util.c
parentccf3778572d461ef6319bd8c6b34fb68baea23ad (diff)
start new selector system - search not working yet
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 2be0f19..b146c82 100644
--- a/util.c
+++ b/util.c
@@ -167,6 +167,7 @@ size_t strn_len(const char *src, size_t n) {
// duplicates at most n characters from src
char *strn_dup(const char *src, size_t n) {
+ if (!src) return NULL;
size_t len = strn_len(src, n);
if (n > len)
n = len;