restore previous focus upon character match failure in compare_pstr_to_string (#441)
This commit is contained in:
@@ -45,7 +45,7 @@ impl<'a> HeapPStrIter<'a> {
|
||||
|
||||
#[inline]
|
||||
pub(crate)
|
||||
fn focus(&'a self) -> Addr {
|
||||
fn focus(&self) -> Addr {
|
||||
self.machine_st.store(self.machine_st.deref(self.focus))
|
||||
}
|
||||
|
||||
@@ -303,6 +303,10 @@ fn compare_pstr_to_string<'a>(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if s[s_offset ..].is_empty() {
|
||||
return Some(s_offset);
|
||||
}
|
||||
}
|
||||
|
||||
Some(s_offset)
|
||||
|
||||
Reference in New Issue
Block a user