fix stream position and term comparison bugs (#1472)

This commit is contained in:
Mark Thom
2022-05-22 14:15:56 -06:00
parent e486862db8
commit 10a11c293e
3 changed files with 35 additions and 8 deletions

View File

@@ -1546,7 +1546,10 @@ impl MachineState {
}
} else {
self.pdl.clear();
return Some(n1.chars().next().cmp(&Some(c2)));
return Some(
n1.chars().next().cmp(&Some(c2))
.then(Ordering::Greater)
);
}
}
_ => {
@@ -1564,7 +1567,10 @@ impl MachineState {
}
} else {
self.pdl.clear();
return Some(Some(c1).cmp(&n2.chars().next()));
return Some(
Some(c1).cmp(&n2.chars().next())
.then(Ordering::Less)
);
}
}
(HeapCellValueTag::Char, c2) => {