From 4a8c8a3a7591a7c79149e8289537c3eb1b1e73c8 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 7 Jul 2012 14:17:02 +0900 Subject: [PATCH] Fix for string-concatenate on empty lists. --- sexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sexp.c b/sexp.c index a67d9a26..242b1f33 100644 --- a/sexp.c +++ b/sexp.c @@ -1051,7 +1051,7 @@ sexp sexp_string_concatenate_op (sexp ctx, sexp self, sexp_sint_t n, sexp str_ls return sexp_type_exception(ctx, self, SEXP_STRING, sexp_car(ls)); else len += sexp_string_length(sexp_car(ls)); - if (sexp_stringp(sep) && ((sep_len=sexp_string_length(sep)) > 0)) { + if ((i > 0) && sexp_stringp(sep) && ((sep_len=sexp_string_length(sep)) > 0)) { csep = sexp_string_data(sep); len += sep_len*(i-1); }