fix isl_printer_start_line for string printer
commit7f9f230ef9f8bfb0d60088cb246fef7114e3377a
authorSven Verdoolaege <sven@cerebras.net>
Mon, 11 Feb 2019 16:07:51 +0000 (11 17:07 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 12 Feb 2019 18:16:15 +0000 (12 19:16 +0100)
tree27b467db133440367f973166b58028d10f734766
parent87b21f0bbc07eab31a9596f1e136833326f03858
fix isl_printer_start_line for string printer

The string printer failed to terminate the string buffer
after printing the indentation.
This does not usually cause any problems because
the call to isl_printer_start_line is typically followed
by a call to some other printing.
However, if isl_printer_get_str gets called immediately
after a call to isl_printer_start_line, it could potentially
read uninitialized memory.
Terminate the string after printing the indentation.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_printer.c