properly match strings concluding with characters in lists (#1597)

This commit is contained in:
Mark Thom
2022-09-01 21:14:50 -06:00
parent ce313b8a6b
commit 1109e05e06

View File

@@ -179,6 +179,14 @@ impl<'a> HeapPStrIter<'a> {
if self.at_string_terminator() { if self.at_string_terminator() {
self.focus = empty_list_as_cell!(); self.focus = empty_list_as_cell!();
self.brent_st.hare = result.focus; self.brent_st.hare = result.focus;
} else {
read_heap_cell!(self.heap[result.focus],
(HeapCellValueTag::Lis | HeapCellValueTag::Str) => {
self.focus = self.heap[self.brent_st.hare];
}
_ => {
}
);
} }
} }
@@ -330,7 +338,7 @@ impl<'a> HeapPStrIter<'a> {
}) })
} else { } else {
None None
} };
} }
(HeapCellValueTag::Str, s) => { (HeapCellValueTag::Str, s) => {
let (name, arity) = cell_as_atom_cell!(self.heap[s]) let (name, arity) = cell_as_atom_cell!(self.heap[s])