From ce4640bd6989d049c5ccfa04c8561c9a77ca6f21 Mon Sep 17 00:00:00 2001 From: goffioul Date: Tue, 7 Jun 2005 09:14:03 +0000 Subject: [PATCH] Explicitely set null character at the end of the string. In at least one test (Win32/MSVC), this is not the case. --- src/lsp/ffi.lsp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lsp/ffi.lsp b/src/lsp/ffi.lsp index 1ce4a52b5..ace844124 100644 --- a/src/lsp/ffi.lsp +++ b/src/lsp/ffi.lsp @@ -417,6 +417,7 @@ cl_index size = lisp_string->string.fillp; cl_object output = ecl_allocate_foreign_data(@(* :char), size+1); memcpy(output->foreign.data, lisp_string->string.self, size); + output->foreign.data[size] = '\\0'; @(return) = output; }" :one-liner nil