In before, FixedPcdGetxx macro was defined as global variable, it is wrong. It should be defined as value directly, and module developer can use it to define length of array.
1) Change macro FixedPcdGetxx to value macro. 2) Change some wrong macro usage in library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@598 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -155,8 +155,8 @@ StrLen (
|
||||
// If PcdMaximumUnicodeStringLength is not zero,
|
||||
// length should not more than PcdMaximumUnicodeStringLength
|
||||
//
|
||||
if (FixedPcdGet32 (PcdMaximumUnicodeStringLength) != 0) {
|
||||
ASSERT (Length < FixedPcdGet32 (PcdMaximumUnicodeStringLength));
|
||||
if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {
|
||||
ASSERT (Length < PcdGet32 (PcdMaximumUnicodeStringLength));
|
||||
}
|
||||
}
|
||||
return Length;
|
||||
@@ -520,8 +520,8 @@ AsciiStrLen (
|
||||
// If PcdMaximumUnicodeStringLength is not zero,
|
||||
// length should not more than PcdMaximumUnicodeStringLength
|
||||
//
|
||||
if (FixedPcdGet32 (PcdMaximumAsciiStringLength) != 0) {
|
||||
ASSERT (Length < FixedPcdGet32 (PcdMaximumAsciiStringLength));
|
||||
if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {
|
||||
ASSERT (Length < PcdGet32 (PcdMaximumAsciiStringLength));
|
||||
}
|
||||
}
|
||||
return Length;
|
||||
|
Reference in New Issue
Block a user