correct partial string copying by resetting threshold to redirected partial string stubs to 0

This commit is contained in:
Mark Thom
2020-04-12 23:33:07 -06:00
parent 787fbe1bb6
commit 02eb24cd57
2 changed files with 11 additions and 5 deletions

View File

@@ -104,7 +104,7 @@ impl<T: CopierTarget> CopyTermState<T> {
fn copy_partial_string(&mut self, addr: usize, n: usize) {
if let &HeapCellValue::Addr(Addr::PStrLocation(h, _)) = &self.target[addr] {
if h >= self.old_h {
*self.value_at_scan() = HeapCellValue::Addr(Addr::PStrLocation(h, n));
*self.value_at_scan() = HeapCellValue::Addr(Addr::PStrLocation(h, 0));
self.scan += 1;
return;