From cc3ed183b0e769cb72cff40099ab49a33a446bad Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 16:07:31 +0000 Subject: [PATCH] Fix for ToString optional "length" param date 2001.07.11.20.54.00; author rmoore1; state Exp; --- source/compiler/asloperands.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index 5cb0c9e02..33010ebe5 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -1,8 +1,8 @@ /****************************************************************************** * - * Module Name: asloperands - AML opcode generation - * $Revision: 1.23 $ + * Module Name: asloperands - AML operand processing + * $Revision: 1.25 $ * *****************************************************************************/ @@ -686,13 +686,21 @@ OpnDoPackage ( } - if (!PackageLength) + /* + * If not a variable-length package, check for a zero + * package length + */ + if ((PackageLengthNode->ParseOpcode == INTEGER) || + (PackageLengthNode->ParseOpcode == DEFAULT_ARG)) { - /* No length AND no items -- issue a warning */ + if (!PackageLength) + { + /* No length AND no items -- issue a warning */ - AslError (ASL_WARNING, ASL_MSG_PACKAGE_LENGTH, PackageLengthNode, NULL); + AslError (ASL_WARNING, ASL_MSG_PACKAGE_LENGTH, PackageLengthNode, NULL); - /* But go ahead and put the buffer length of zero into the AML */ + /* But go ahead and put the buffer length of zero into the AML */ + } }