forked from AbleOS/holey-bytes
fixed
This commit is contained in:
parent
82160af7af
commit
642488cb64
|
@ -165,7 +165,7 @@ pub fn assembly(code: &str, buf: &mut Vec<u8>) -> Result<(), Error> {
|
|||
let imm = match imm {
|
||||
Token::Integer(n) => n.to_le_bytes(),
|
||||
Token::Symbol(s) => {
|
||||
self.subset.insert(self.buf.len() - 1);
|
||||
self.subset.insert(self.buf.len());
|
||||
s.into_usize().to_le_bytes()
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
@ -188,8 +188,8 @@ pub fn assembly(code: &str, buf: &mut Vec<u8>) -> Result<(), Error> {
|
|||
let imm = match imm {
|
||||
Token::Integer(n) => n.to_le_bytes(),
|
||||
Token::Symbol(s) => {
|
||||
self.subset.insert(self.buf.len() - 1);
|
||||
(s.into_inner().get() as usize).to_le_bytes()
|
||||
self.subset.insert(self.buf.len());
|
||||
s.into_usize().to_le_bytes()
|
||||
}
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue