From 9833f44704a63014209f467af81f118011f0d3dd Mon Sep 17 00:00:00 2001 From: Jordan Hargrave Date: Thu, 2 Jun 2011 19:26:36 +0000 Subject: Fix index for Mid() opcode --- sys/dev/acpi/dsdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/acpi/dsdt.c') diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index fabe5e77711..6ef46f0c7be 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.186 2011/06/02 17:15:53 jordan Exp $ */ +/* $OpenBSD: dsdt.c,v 1.187 2011/06/02 19:26:35 jordan Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave * @@ -2166,7 +2166,7 @@ struct aml_value * aml_mid(struct aml_value *src, int index, int length) { if (index > src->length) - index = 0; + index = src->length; if ((index + length) > src->length) length = src->length - index; return aml_allocvalue(src->type, length, src->v_buffer + index); -- cgit v1.2.3