Skip to content

Commit 4390f04

Browse files
authored
AML: Allow Field in ToInteger (rebased) (#213)
1 parent 35f9fba commit 4390f04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aml/src/expression.rs

+3
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ where
812812
AmlValue::Buffer(data) => {
813813
AmlValue::Integer(try_with_context!(context, AmlValue::Buffer(data).as_integer(context)))
814814
}
815+
AmlValue::Field { .. } => {
816+
AmlValue::Integer(try_with_context!(context, operand.as_integer(context)))
817+
}
815818
AmlValue::String(string) => AmlValue::Integer(try_with_context!(
816819
context,
817820
if string.starts_with("0x") {

0 commit comments

Comments
 (0)