summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/Console
diff options
context:
space:
mode:
authorMichael Kinney <michael.d.kinney@intel.com>2016-10-26 20:13:27 -0700
committerMichael Kinney <michael.d.kinney@intel.com>2016-10-27 11:29:52 -0700
commitd1b757e2cd034e32676c5cc2d542f785e74f8c5d (patch)
tree10cb07969ff05a8f3fffe98e3f0098db2152baf2 /MdeModulePkg/Universal/Console
parentbb47667aa726cf86634f6ccbb445d080994f9e22 (diff)
downloadedk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.tar.gz
edk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.tar.bz2
edk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.zip
MdeModulePkg/TerminalDxe: Fix IA32 VS2015x86 build break
https://bugzilla.tianocore.org/show_bug.cgi?id=190 The issue is with signed/unsigned comparisons between Mode->CursorRow and Row and Mode->CursorColumn and Column. The fix is to add typecast to UINTN for comparisons. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Brian Johnson <bjohnson@sgi.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Brian Johnson <bjohnson@sgi.com>
Diffstat (limited to 'MdeModulePkg/Universal/Console')
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
index e9b5ed07cf..9625f4d518 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c
@@ -790,13 +790,13 @@ TerminalConOutSetCursorPosition (
// it isn't necessary.
//
if (TerminalDevice->TerminalType == TTYTERMTYPE &&
- Mode->CursorRow == Row) {
- if (Mode->CursorColumn > Column) {
+ (UINTN)Mode->CursorRow == Row) {
+ if ((UINTN)Mode->CursorColumn > Column) {
mCursorBackwardString[FW_BACK_OFFSET + 0] = (CHAR16) ('0' + ((Mode->CursorColumn - Column) / 10));
mCursorBackwardString[FW_BACK_OFFSET + 1] = (CHAR16) ('0' + ((Mode->CursorColumn - Column) % 10));
String = mCursorBackwardString;
}
- else if (Column > Mode->CursorColumn) {
+ else if (Column > (UINTN)Mode->CursorColumn) {
mCursorForwardString[FW_BACK_OFFSET + 0] = (CHAR16) ('0' + ((Column - Mode->CursorColumn) / 10));
mCursorForwardString[FW_BACK_OFFSET + 1] = (CHAR16) ('0' + ((Column - Mode->CursorColumn) % 10));
String = mCursorForwardString;