interpret '\u{0}' as end_of_file in get_char/1
This commit is contained in:
@@ -3400,11 +3400,7 @@ impl Machine {
|
|||||||
let result = iter.read_char();
|
let result = iter.read_char();
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Some(Ok(c)) => {
|
Some(Ok('\u{0}')) | Some(Err(_)) | None => {
|
||||||
self.machine_st.unify_char(c, addr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
self.machine_st.eof_action(
|
self.machine_st.eof_action(
|
||||||
self.machine_st.registers[2],
|
self.machine_st.registers[2],
|
||||||
stream,
|
stream,
|
||||||
@@ -3418,6 +3414,10 @@ impl Machine {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some(Ok(c)) => {
|
||||||
|
self.machine_st.unify_char(c, addr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user