]> Repositorios git - scryer-prolog.git/commitdiff
FIXED: reliably write all characters when using format/3
authorMarkus Triska <[email protected]>
Wed, 2 Sep 2020 17:20:49 +0000 (19:20 +0200)
committerMarkus Triska <[email protected]>
Wed, 2 Sep 2020 17:29:04 +0000 (19:29 +0200)
This addresses #693.

Many thanks to @notoria for a brilliant test case, and the
suggestion of this correction!

src/machine/system_calls.rs

index d2779d1ae544a0b070307d31b53344e32a262082..a49330974da2914bdbd2cdb141b2ff4d0c23f1d9 100644 (file)
@@ -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);
                     }