diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-26 10:36:49 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-26 10:36:49 -0400 |
commit | 1b63c1503bddfd8f48e7ca4e97b029d7ad030635 (patch) | |
tree | d13bde56de457b3b8bf70c94abc8125442822168 | |
parent | 37ec63ece45c7f27f576e1fb5911b55630125d03 (diff) | |
download | spmc-1b63c1503bddfd8f48e7ca4e97b029d7ad030635.tar.gz |
Guarantee the array is terminated
-rw-r--r-- | lib/str.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |