diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-23 00:08:53 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-23 00:08:53 +0100 |
commit | 45ad8f7296722cc3cec0a6974f9d2519c9f36d4b (patch) | |
tree | 0f4aa7d588f7375647c536be27305489e5492c49 /src/runtime.c | |
parent | b44eaefabb6dc6825e959910dafcc99f3dc99256 (diff) | |
download | ovm-45ad8f7296722cc3cec0a6974f9d2519c9f36d4b.tar.gz ovm-45ad8f7296722cc3cec0a6974f9d2519c9f36d4b.tar.bz2 ovm-45ad8f7296722cc3cec0a6974f9d2519c9f36d4b.zip |
Fixed bug where vm_print_program listing for program was incorrect
Only happens when vm_print_program(STDERR), as STDERR occurs before
STDOUT on Emacs. So while the lines would print, no instructions
would follow. This fixes that by using fp.
Diffstat (limited to 'src/runtime.c')
-rw-r--r-- | src/runtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime.c b/src/runtime.c index df2a460..ac1cf58 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -267,7 +267,7 @@ void vm_print_program(vm_t *vm, FILE *fp) for (size_t i = beg; i < end; ++i) { fprintf(fp, "\t%lu: ", i); - inst_print(program.instructions[i], stdout); + inst_print(program.instructions[i], fp); if (i == program.ptr) fprintf(fp, " <---"); fprintf(fp, "\n"); |