From 1b63c1503bddfd8f48e7ca4e97b029d7ad030635 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 26 Mar 2020 10:36:49 -0400 Subject: Guarantee the array is terminated --- lib/str.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/str.c') diff --git a/lib/str.c b/lib/str.c index 0e2f90e..55e1c79 100644 --- a/lib/str.c +++ b/lib/str.c @@ -206,6 +206,7 @@ char** split(char *_sptr, const char* delim) // No delimiter, but the string was not NULL, so return the original string if (split_alloc == 0) { result[0] = sptr; + result[1] = NULL; return result; } -- cgit