From 717d3148648ec38c84768088a8d124113e6d96cb Mon Sep 17 00:00:00 2001 From: Ron Williams Date: Sun, 7 Apr 2024 04:59:03 -0700 Subject: [PATCH] AML: Allow Field in ToInteger (rebased) --- aml/src/expression.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aml/src/expression.rs b/aml/src/expression.rs index a8f083b5..6b56ceea 100644 --- a/aml/src/expression.rs +++ b/aml/src/expression.rs @@ -812,6 +812,9 @@ where AmlValue::Buffer(data) => { AmlValue::Integer(try_with_context!(context, AmlValue::Buffer(data).as_integer(context))) } + AmlValue::Field { .. } => { + AmlValue::Integer(try_with_context!(context, operand.as_integer(context))) + } AmlValue::String(string) => AmlValue::Integer(try_with_context!( context, if string.starts_with("0x") {