From 3ac1a285a95dd00bd8abcb591f51bd61d3c34d88 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 18 Apr 2016 16:38:29 +0100 Subject: [PATCH] make syre we have a NUL pointer. --- C/write.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C/write.c b/C/write.c index 9b011726d..4f4b6dda9 100644 --- a/C/write.c +++ b/C/write.c @@ -393,8 +393,10 @@ int Yap_FormatFloat(Float f, char **s, size_t sz) { *s, sz, &GLOBAL_Stream[LOCAL_c_output_stream].encoding, 0); if (sno < 0) return FALSE; + wglb.lw = separator; wglb.stream = GLOBAL_Stream + sno; wrputf(f, &wglb); + wrputc('\0', wglb.stream); so = Yap_MemExportStreamPtr(sno); Yap_CloseStream(sno); *s = so;