summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xs_regex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_regex.h b/xs_regex.h
index 5ccefda..a2792c7 100644
--- a/xs_regex.h
+++ b/xs_regex.h
@@ -58,7 +58,7 @@ xs_list *xs_regex_split_n(const char *str, const char *rx, int count)
58 } 58 }
59 59
60 /* add the rest of the string */ 60 /* add the rest of the string */
61 list = xs_list_append(list, p); 61 list = xs_list_append(list, xs_is_string(p) ? p : "");
62 62
63 regfree(&re); 63 regfree(&re);
64 64