]> Repositorios git - scryer-prolog.git/commitdiff
clear pdl after comparing partial strings (#3048)
authorMark Thom <[email protected]>
Sat, 16 Aug 2025 22:26:10 +0000 (15:26 -0700)
committerMark Thom <[email protected]>
Sat, 16 Aug 2025 22:26:10 +0000 (15:26 -0700)
src/machine/machine_state_impl.rs

index 3de055e52366f59a1f98690b0c85bac78954b75b..2ef605bfedfaa91196747aa9b5e732b8015cdbe1 100644 (file)
@@ -564,9 +564,11 @@ impl MachineState {
                                             self.pdl.push(v2.offset_by(l2));
                                         }
                                         PStrSegmentCmpResult::Less => {
+                                            self.pdl.clear();
                                             return Some(Ordering::Less);
                                         }
                                         PStrSegmentCmpResult::Greater => {
+                                            self.pdl.clear();
                                             return Some(Ordering::Greater);
                                         }
                                     }