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