fix position property in stream_property/2 (#477)
This commit is contained in:
@@ -4709,12 +4709,8 @@ impl MachineState {
|
||||
}
|
||||
}
|
||||
"position" => {
|
||||
if stream.options.reposition {
|
||||
if let Some(position) = stream.position() {
|
||||
HeapCellValue::Addr(Addr::Usize(position as usize))
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
if let Some(position) = stream.position() {
|
||||
HeapCellValue::Addr(Addr::Usize(position as usize))
|
||||
} else {
|
||||
self.fail = true;
|
||||
return Ok(());
|
||||
|
||||
Reference in New Issue
Block a user