correct loading of variable name strings in write_term/3

This commit is contained in:
Mark Thom
2022-03-08 22:00:12 -07:00
parent bd5d6d0686
commit 9cefb33388

View File

@@ -641,7 +641,18 @@ impl MachineState {
continue;
}
var_names.insert(var, Rc::new(cell_as_atom!(atom).as_str().to_owned()));
read_heap_cell!(atom,
(HeapCellValueTag::Char, c) => {
var_names.insert(var, Rc::new(c.to_string()));
}
(HeapCellValueTag::Atom, (name, _arity)) => {
debug_assert_eq!(_arity, 0);
var_names.insert(var, Rc::new(name.as_str().to_owned()));
}
_ => {
unreachable!();
}
);
}
}
_ => {