]> Repositorios git - scryer-prolog.git/commitdiff
re: issue #144
authorMark Thom <[email protected]>
Sun, 16 Jun 2019 05:25:42 +0000 (01:25 -0400)
committerMark Thom <[email protected]>
Sun, 16 Jun 2019 05:25:42 +0000 (01:25 -0400)
src/prolog/heap_print.rs

index 8136c75fc66803b4ade8a5bbfadf876a0af0def3..896ee7c72c4c8b3f320cd37b5cf22f922a2f49e5 100644 (file)
@@ -819,9 +819,14 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter>
                 },
             DoubleQuotes::Atom => {
                 let borrowed_str = s.borrow();
+                let mut atom = String::new();
+
+                for c in borrowed_str[s.cursor() ..].chars() {
+                    atom += &char_to_string(c);
+                }
 
                 self.push_char('"');
-                self.append_str(&borrowed_str[s.cursor() ..]);
+                self.append_str(&atom);
                 self.push_char('"');
             }
         }