aboutsummaryrefslogtreecommitdiff
path: root/source/components/resources/rscalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/resources/rscalc.c')
-rw-r--r--source/components/resources/rscalc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c
index 845ed69c7dee..12af85ea30ce 100644
--- a/source/components/resources/rscalc.c
+++ b/source/components/resources/rscalc.c
@@ -482,6 +482,16 @@ AcpiRsGetListLength (
* Get the number of vendor data bytes
*/
ExtraStructBytes = ResourceLength;
+
+ /*
+ * There is already one byte included in the minimum
+ * descriptor size. If there are extra struct bytes,
+ * subtract one from the count.
+ */
+ if (ExtraStructBytes)
+ {
+ ExtraStructBytes--;
+ }
break;
@@ -626,7 +636,7 @@ AcpiRsGetPciRoutingTableLength (
/*
* Calculate the size of the return buffer.
* The base size is the number of elements * the sizes of the
- * structures. Additional space for the strings is added below.
+ * structures. Additional space for the strings is added below.
* The minus one is to subtract the size of the UINT8 Source[1]
* member because it is added below.
*