From c351637eebbfd49de7fc3aaf45d2ae9050715460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa=20II?= Date: Thu, 29 Apr 2010 23:45:08 +0100 Subject: [PATCH] add\0 after CVT_WRITE --- library/yap2swi/yap2swi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/yap2swi/yap2swi.c b/library/yap2swi/yap2swi.c index f319fc8d1..32e3d622d 100755 --- a/library/yap2swi/yap2swi.c +++ b/library/yap2swi/yap2swi.c @@ -400,6 +400,7 @@ X_API int PL_get_chars(term_t l, char **sp, unsigned flags) putc_cur_lim = tmp+(BUF_SIZE-1); } Yap_plwrite(t, do_yap_putc, write_flags, 1200); + *putc_cur_buf = '\0'; /* may have changed due to overflows */ *sp = putc_cur_buf; return TRUE;