X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FLibrary%2FDxePrintLibPrint2Protocol%2FPrintLib.c;fp=MdeModulePkg%2FLibrary%2FDxePrintLibPrint2Protocol%2FPrintLib.c;h=56534e56c3a1e06d554561caf99b5d5e8de9ed80;hb=1dfb0bf20e0b41d720940b2cdf4f81ebd8a099a8;hp=b58db8e011a8517c741e947b2990c29522242488;hpb=ea0b15067c54e8c34321e9f094515302039be12e;p=mirror_edk2.git diff --git a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c index b58db8e011..56534e56c3 100644 --- a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c +++ b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c @@ -2108,7 +2108,7 @@ InternalPrintLibSPrintMarker ( // Copy the string into the output buffer performing the required type conversions // while (Index < Count) { - ArgumentCharacter = ((*ArgumentString & 0xff) | (*(ArgumentString + 1) << 8)) & ArgumentMask; + ArgumentCharacter = ((*ArgumentString & 0xff) | (((UINT8)*(ArgumentString + 1)) << 8)) & ArgumentMask; LengthToReturn += (1 * BytesPerOutputCharacter); if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) {