Skip to content

Commit abb054b

Browse files
committed
AML: attempt implicit integer conversion on stores
1 parent 4ce1dad commit abb054b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/aml/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,10 @@ where
18331833
// TODO: not sure if we should convert buffers to integers if needed here?
18341834
*target = self.do_field_read(field)?.as_integer()?;
18351835
}
1836-
_ => panic!("Store to integer from unsupported object: {:?}", object),
1836+
_ => {
1837+
let as_integer = object.to_integer(if self.dsdt_revision >= 2 { 8 } else { 4 })?;
1838+
*target = as_integer;
1839+
}
18371840
},
18381841
Object::BufferField { .. } => match object.gain_mut() {
18391842
Object::Integer(value) => {

0 commit comments

Comments
 (0)