summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-22 02:39:57 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-22 02:39:57 +0000
commit265fa9fa399225509fe2f9b5b24c3619e30aa411 (patch)
tree00258ce3ea353ce62e9ed1d4b92ae1af058700f2 /MdePkg/Library
parent53c31c516489d4cd46d20d59a3705720be3443f1 (diff)
downloadedk2-platforms-265fa9fa399225509fe2f9b5b24c3619e30aa411.tar.xz
MdePkg: Add a new macro VA_COPY for variable argument support. Fix a bug in the UefiLib instance that there is a non portable assumption that Marker is copied when passed to a function.
Signed-off-by: rsun3 Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13025 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/UefiLib/UefiLibPrint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c
index 6eadc120c8..1bf6d26821 100644
--- a/MdePkg/Library/UefiLib/UefiLibPrint.c
+++ b/MdePkg/Library/UefiLib/UefiLibPrint.c
@@ -742,8 +742,11 @@ CatVSPrint (
UINTN CharactersRequired;
UINTN SizeRequired;
CHAR16 *BufferToReturn;
+ VA_LIST ExtraMarker;
- CharactersRequired = SPrintLength(FormatString, Marker);
+ VA_COPY (ExtraMarker, Marker);
+ CharactersRequired = SPrintLength(FormatString, ExtraMarker);
+ VA_END (ExtraMarker);
if (String != NULL) {
SizeRequired = StrSize(String) + (CharactersRequired * sizeof(CHAR16));