enabled rigorous address range checks

This commit is contained in:
koolsmoky
2007-09-29 14:07:49 +00:00
parent 39adf6422d
commit 02f96edc18

View File

@@ -507,7 +507,8 @@ FxBool fits_in_hole(RangeStruct *begin,FxU32 end,RangeStruct *hole,RangeStruct *
/* note could be <= */
/* this is safer but more inefficient memory wise */
if ((address+conflict->range)<end)
/* help those with many devices crammed. use <=. */
if ((address+conflict->range)<=end)
{
hole->address=address;
hole->range=end-address;
@@ -523,7 +524,8 @@ FxBool fits_under(RangeStruct *first,FxU32 minimum,RangeStruct *hole,RangeStruct
address=minimum;
address=SnapToDecentAddress(address,conflict);
if ((address+conflict->range) < first->address)
/* help those with many devices crammed. use <=. */
if ((address+conflict->range) <= first->address)
{
hole->address=address;
hole->range=first->address - address;