Because 0 is reserved as invalid token number.
Cc: Liming Gao <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <[email protected]>
---
Universal/PCD/Dxe/Service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Universal/PCD/Dxe/Service.c b/Universal/PCD/Dxe/Service.c
index 9b4701b..cf5f244 100644
--- a/Universal/PCD/Dxe/Service.c
+++ b/Universal/PCD/Dxe/Service.c
@@ -1864,7 +1864,7 @@ VariableLockDynamicHiiPcd (
//
// Go through PCD database to find out DynamicHii PCDs.
//
- for (TokenNumber = 0; TokenNumber < LocalTokenCount; TokenNumber++) {
+ for (TokenNumber = 1; TokenNumber <= LocalTokenCount; TokenNumber++) {
if (IsPeiDb) {
LocalTokenNumber = GetLocalTokenNumber (TRUE, TokenNumber);
} else {
--
1.9.5.msysgit.0
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel