summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index d3c628592..ab159ad09 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5034,7 +5034,7 @@ bin_print(char *name, char **args, Options ops, int func)
 	    if (buf)
 		free(buf);
 	} else {
-	    if (visarr) {
+	    if (visarr && splits) {
 		char **arrayval = zshcalloc((cursplit - splits + 2) * sizeof(char *));
 		for (;cursplit >= splits; cursplit--) {
 		    int start = cursplit == splits ? 0 : cursplit[-1];