aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2019-02-02 23:14:08 +0000
committerGitHub <noreply@github.com>2019-02-02 23:14:08 +0000
commit2dc7aaec82d109582ba5df71b9eebde5819dc33b (patch)
tree2a36fc0d4a6bb34243dd7ca61aa198d57ee580a6 /src
parent141da818ba0f1a9a2ac40a60c21a42f0dd45533f (diff)
parentb7242f9d4b184f5fa66e5de992a31844f7ecdd82 (diff)
Merge pull request #332 from thebirk/fix-big-string-printing
Fix #322, now correctly printing big strings.
Diffstat (limited to 'src')
-rw-r--r--src/ir_print.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}