Fix the wrong usage of UnicodeValueToString function
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 7 Jul 2006 12:06:13 +0000 (12:06 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 7 Jul 2006 12:06:13 +0000 (12:06 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@824 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/Boolean.c

index c7bcb88fb2a5b5aa8518ccf6e1d6c6b0ab10a6a3..122da065a9723501f75c54376489d1c9a5ccef20 100644 (file)
@@ -456,7 +456,7 @@ Returns:
   UINT16                  MapValue;\r
   UINT16                  MapValue2;\r
   UINTN                   SizeOfVariable;\r
-  CHAR16                  VariableName[40];\r
+  CHAR16                  VariableName[MAXIMUM_VALUE_CHARACTERS];\r
   VOID                    *VariableData;\r
   EFI_VARIABLE_DEFINITION *VariableDefinition;\r
   EFI_STATUS              Status;\r
@@ -512,7 +512,7 @@ Returns:
         VariableName, \r
         FALSE, \r
         (UINTN) (*PIterator)->QuestionId1, \r
-        (sizeof (VariableName) / sizeof (VariableName[0]))\r
+        (sizeof (VariableName) / sizeof (VariableName[0])) - 1\r
         );\r
 \r
       SizeOfVariable = 0;\r
@@ -672,7 +672,7 @@ Returns:
   UINT16                  MapValue;\r
   UINT16                  MapValue2;\r
   UINTN                   SizeOfVariable;\r
-  CHAR16                  VariableName[40];\r
+  CHAR16                  VariableName[MAXIMUM_VALUE_CHARACTERS];\r
   VOID                    *VariableData;\r
   EFI_STATUS              Status;\r
   UINT16                  Id;\r
@@ -811,7 +811,7 @@ Returns:
         VariableName, \r
         FALSE, \r
         (UINTN) Iterator->QuestionId1, \r
-        (sizeof (VariableName) / sizeof (VariableName[0]))\r
+        (sizeof (VariableName) / sizeof (VariableName[0])) - 1\r
         );\r
 \r
       SizeOfVariable = 0;\r
@@ -944,7 +944,7 @@ Returns:
           VariableName, \r
           FALSE, \r
           (UINTN) Iterator->QuestionId1, \r
-          (sizeof (VariableName) / sizeof (VariableName[0]))\r
+          (sizeof (VariableName) / sizeof (VariableName[0])) - 1\r
           );\r
 \r
         SizeOfVariable = 0;\r
@@ -1080,7 +1080,7 @@ Returns:
           VariableName, \r
           FALSE, \r
           (UINTN) Iterator->QuestionId1, \r
-          (sizeof (VariableName) / sizeof (VariableName[0]))\r
+          (sizeof (VariableName) / sizeof (VariableName[0])) - 1\r
           );\r
 \r
         SizeOfVariable = 0;\r
@@ -1228,7 +1228,7 @@ Returns:
           VariableName, \r
           FALSE, \r
           (UINTN) Iterator->QuestionId1, \r
-          (sizeof (VariableName) / sizeof (VariableName[0]))\r
+          (sizeof (VariableName) / sizeof (VariableName[0])) - 1\r
           );\r
 \r
         SizeOfVariable = 0;\r