Skip to main content

luaur_bytecode/methods/
bytecode_graph_serializer_get_vm_const_input_abc.rs

1use crate::records::bc_inst::BcInst;
2use crate::records::bytecode_graph_serializer::BytecodeGraphSerializer;
3
4impl<'a> BytecodeGraphSerializer<'a> {
5    pub fn get_vm_const_input_abc(&mut self, insn: &mut BcInst, index: u8) -> u8 {
6        let cid: u32 = self.get_vm_const_input_raw(insn, index);
7
8        if cid > 0xff {
9            self.error = true;
10        }
11
12        cid as u8
13    }
14}