fix incorrect masking
storing 36 bits of data in a 32 bit integer doesn't work so well
This commit is contained in:
parent
72f227a1f9
commit
90b57a78be
@ -36,9 +36,9 @@ namespace ARMeilleure.Common
|
||||
/// </summary>
|
||||
/// <param name="address">Guest address</param>
|
||||
/// <returns>Value of the <see cref="AddressTableLevel"/> from the specified guest <paramref name="address"/></returns>
|
||||
public int GetValue(ulong address)
|
||||
public long GetValue(ulong address)
|
||||
{
|
||||
return (int)((address & Mask) >> Index);
|
||||
return (long)((address & Mask) >> Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ namespace ARMeilleure.Common
|
||||
{
|
||||
TEntry* page = GetPage(address);
|
||||
|
||||
int index = Levels[^1].GetValue(address);
|
||||
long index = Levels[^1].GetValue(address);
|
||||
|
||||
EnsureMapped((IntPtr)(page + index));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user