]> Repositorios git - scryer-prolog.git/commitdiff
remove redundant error handling, since this case is checked in Prolog
authorMarkus Triska <[email protected]>
Sat, 3 Sep 2022 19:18:27 +0000 (21:18 +0200)
committerMark Thom <[email protected]>
Thu, 27 Oct 2022 05:36:07 +0000 (23:36 -0600)
This restores f668640e3d9c4ccbd1fc0c6e98e1fb9c2cf1a39c, where this
change was already made. It seems it was accidentally overwritten in
0404c3bd949b09d6713d3869e37d30a6b8a77f97.

src/machine/system_calls.rs

index 5b52e795d25054c086cf023f6e67a33b3c1cb790..ba78afdc65242510d14d3755e0517929b3359a93 100644 (file)
@@ -6631,17 +6631,6 @@ impl Machine {
         } else {
             let mut bytes = vec![];
             for c in self.machine_st.value_to_str_like(self.machine_st.registers[1]).unwrap().as_str().chars() {
-                if c as u32 > 255 {
-                    let stub = functor_stub(atom!("chars_base64"), 3);
-
-                    let err = self.machine_st.type_error(
-                        ValidType::Byte,
-                        char_as_cell!(c),
-                    );
-
-                    return Err(self.machine_st.error_form(err, stub));
-                }
-
                 bytes.push(c as u8);
             }