From b1fe24bb57ddd795398b06821248a297f600b0dc Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 16 Aug 2024 13:03:13 +0300 Subject: [PATCH] Kernel: Hack AML integers to work better Something is trying to store into a constant integers. Just by copying not returning any integers as constants fixes it xD --- kernel/kernel/ACPI/AML/Integer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/kernel/ACPI/AML/Integer.cpp b/kernel/kernel/ACPI/AML/Integer.cpp index 83f0d67339..75a389677e 100644 --- a/kernel/kernel/ACPI/AML/Integer.cpp +++ b/kernel/kernel/ACPI/AML/Integer.cpp @@ -100,13 +100,16 @@ namespace Kernel::ACPI { case AML::Byte::ZeroOp: aml_data = aml_data.slice(1); - return ParseResult(Constants::Zero); + // FIXME: no copy + return ParseResult(Constants::Zero->copy()); case AML::Byte::OneOp: aml_data = aml_data.slice(1); - return ParseResult(Constants::One); + // FIXME: no copy + return ParseResult(Constants::One->copy()); case AML::Byte::OnesOp: aml_data = aml_data.slice(1); - return ParseResult(Constants::Ones); + // FIXME: no copy + return ParseResult(Constants::Ones->copy()); case AML::Byte::BytePrefix: { if (aml_data.size() < 2)