aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-05-20 21:38:08 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-05-21 13:19:47 +0200
commit5307d24315760121756871e9b82f08a4263e4be7 (patch)
tree655981db1fd4214fabcb9c1479a52b2993b8991a
parentd2155031d07a44e33ee229178a3a73d2408a5098 (diff)
downloadell-5307d24315760121756871e9b82f08a4263e4be7.tar.gz
ell-5307d24315760121756871e9b82f08a4263e4be7.tar.xz
ell-5307d24315760121756871e9b82f08a4263e4be7.zip
Slightly fix fn_concatenate()
-rwxr-xr-xell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ell.c b/ell.c
index ef02127..e245958 100755
--- a/ell.c
+++ b/ell.c
@@ -1024,8 +1024,8 @@ defn (fn_concatenate) {
}
buffer_append_c (&buf, '\0');
- bool ok = !(ctx->memory_failure = buf.memory_failure)
- && check (ctx, (*result = new_string (buf.s, buf.len)));
+ bool ok = !(ctx->memory_failure |= buf.memory_failure)
+ && check (ctx, (*result = new_string (buf.s, buf.len - 1)));
free (buf.s);
return ok;
}