VirtualBox

Changeset 1443 in vbox


Ignore:
Timestamp:
Mar 13, 2007 3:09:02 PM (18 years ago)
Author:
vboxsync
Message:

cast the uint16_t selector value before shifting it, just a precaution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/SELMAll.cpp

    r1408 r1443  
    9696        ||  eflags.Bits.u1VM)
    9797    {
    98         RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + (Sel << 4);
     98        RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + ((RTGCUINTPTR)Sel << 4);
    9999        return (RTGCPTR)uFlat;
    100100    }
     
    135135        if (ppvGC)
    136136        {
    137             RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + (Sel << 4);
     137            RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + ((RTGCUINTPTR)Sel << 4);
    138138            *ppvGC = (RTGCPTR)uFlat;
    139139        }
     
    383383        if (ppvFlat)
    384384        {
    385             RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + (SelCS << 4);
     385            RTGCUINTPTR uFlat = ((RTGCUINTPTR)Addr & 0xffff) + ((RTGCUINTPTR)SelCS << 4);
    386386            *ppvFlat = (RTGCPTR)uFlat;
    387387        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette