mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 22:59:16 +02:00
Fix for string-concatenate on empty lists.
This commit is contained in:
parent
6bcfd141be
commit
4a8c8a3a75
1 changed files with 1 additions and 1 deletions
2
sexp.c
2
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));
|
return sexp_type_exception(ctx, self, SEXP_STRING, sexp_car(ls));
|
||||||
else
|
else
|
||||||
len += sexp_string_length(sexp_car(ls));
|
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);
|
csep = sexp_string_data(sep);
|
||||||
len += sep_len*(i-1);
|
len += sep_len*(i-1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue