From: Markus Triska Date: Wed, 2 Sep 2020 17:20:49 +0000 (+0200) Subject: FIXED: reliably write all characters when using format/3 X-Git-Tag: v0.9.0~174^2~4^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=78656d220bac17cfc5d27be98014c58d99256aea;p=scryer-prolog.git FIXED: reliably write all characters when using format/3 This addresses #693. Many thanks to @notoria for a brilliant test case, and the suggestion of this correction! --- diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index d2779d1a..a4933097 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -2137,7 +2137,7 @@ impl MachineState { bytes = string.into_bytes(); } - match stream.write(&bytes) { + match stream.write_all(&bytes) { Ok(_) => { return return_from_clause!(self.last_call, self); }