diff options
author | Michael Schmidt <github@mschmidt.me> | 2016-08-17 16:32:56 +0200 |
---|---|---|
committer | Michael Schmidt <github@mschmidt.me> | 2016-08-17 16:32:56 +0200 |
commit | e0f0f573a4a8fc1f564a31388afa9c23e48bb016 (patch) | |
tree | b7c004b3aae01c79bef8c8914e759a1e3ce358f7 /driver/Interp.ml | |
parent | 18fcf2ffef8b4ba5eb0624b15371e93b4ac88cfe (diff) | |
parent | e2b4459ccd1b0f8436cb70a631772d715e642dcd (diff) | |
download | compcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.tar.gz compcert-e0f0f573a4a8fc1f564a31388afa9c23e48bb016.zip |
fix merge conflicts
Diffstat (limited to 'driver/Interp.ml')
-rw-r--r-- | driver/Interp.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/Interp.ml b/driver/Interp.ml index 5c2158ae..f42bed32 100644 --- a/driver/Interp.ml +++ b/driver/Interp.ml @@ -387,10 +387,12 @@ let do_external_function id sg ge w args m = match camlstring_of_coqstring id, args with | "printf", Vptr(b, ofs) :: args' -> extract_string m b ofs >>= fun fmt -> - print_string (do_printf m fmt args'); + let fmt' = do_printf m fmt args' in + let len = coqint_of_camlint (Int32.of_int (String.length fmt')) in + print_string fmt'; flush stdout; convert_external_args ge args sg.sig_args >>= fun eargs -> - Some(((w, [Event_syscall(id, eargs, EVint Int.zero)]), Vint Int.zero), m) + Some(((w, [Event_syscall(id, eargs, EVint len)]), Vint len), m) | _ -> None |