diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c index 3374d97e3a..30451b922e 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -928,7 +928,7 @@ BasePrintLibSPrintMarker ( FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask; } - if (Flags & COUNT_ONLY_NO_PRINT) { + if ((Flags & COUNT_ONLY_NO_PRINT) != 0) { return (LengthToReturn / BytesPerOutputCharacter); }