From fb6dadce31705f96e3d7ff38eb5bea92bd19d037 Mon Sep 17 00:00:00 2001 From: Ron Williams Date: Fri, 8 Mar 2024 06:53:34 -0800 Subject: [PATCH] allow field in ToInteger --- aml/src/expression.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aml/src/expression.rs b/aml/src/expression.rs index ea256136..5d2d19a3 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") {