make syre we have a NUL pointer.

This commit is contained in:
Vitor Santos Costa 2016-04-18 16:38:29 +01:00
parent 6880fc20a6
commit 3ac1a285a9

View File

@ -393,8 +393,10 @@ int Yap_FormatFloat(Float f, char **s, size_t sz) {
*s, sz, &GLOBAL_Stream[LOCAL_c_output_stream].encoding, 0); *s, sz, &GLOBAL_Stream[LOCAL_c_output_stream].encoding, 0);
if (sno < 0) if (sno < 0)
return FALSE; return FALSE;
wglb.lw = separator;
wglb.stream = GLOBAL_Stream + sno; wglb.stream = GLOBAL_Stream + sno;
wrputf(f, &wglb); wrputf(f, &wglb);
wrputc('\0', wglb.stream);
so = Yap_MemExportStreamPtr(sno); so = Yap_MemExportStreamPtr(sno);
Yap_CloseStream(sno); Yap_CloseStream(sno);
*s = so; *s = so;