mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
bb47667aa7
commit
d1b757e2cd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue