From b7242f9d4b184f5fa66e5de992a31844f7ecdd82 Mon Sep 17 00:00:00 2001 From: thebirk Date: Sat, 2 Feb 2019 00:11:41 +0100 Subject: [PATCH] Fix #322, now correctly printing big strings. --- src/ir_print.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 17d34b659..531b74b2f 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -25,6 +25,11 @@ void ir_file_buffer_destroy(irFileBuffer *f) { void ir_file_buffer_write(irFileBuffer *f, void const *data, isize len) { if (len > f->vm.size) { + //NOTE(thebirk): Flush the vm data before we print this directly + // otherwise we get out of order printing which is no good + gb_file_write(f->output, f->vm.data, f->offset); + f->offset = 0; + gb_file_write(f->output, data, len); return; }