diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2016-10-26 20:13:27 -0700 |
---|---|---|
committer | Michael Kinney <michael.d.kinney@intel.com> | 2016-10-27 11:29:52 -0700 |
commit | d1b757e2cd034e32676c5cc2d542f785e74f8c5d (patch) | |
tree | 10cb07969ff05a8f3fffe98e3f0098db2152baf2 | |
parent | bb47667aa726cf86634f6ccbb445d080994f9e22 (diff) | |
download | edk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.zip edk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.tar.gz edk2-d1b757e2cd034e32676c5cc2d542f785e74f8c5d.tar.bz2 |
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>
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index e9b5ed0..9625f4d 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;
|