add\0 after CVT_WRITE

This commit is contained in:
Vítor Santos Costa II 2010-04-29 23:45:08 +01:00
parent 030539f33b
commit c351637eeb

View File

@ -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;