forked from 0ad/0ad
Fix signed/unsigned comparison warning
This was SVN commit r9972.
This commit is contained in:
parent
f378e2e651
commit
b9bd7ff86e
@ -191,7 +191,7 @@ static Status h_data_from_idx(ssize_t idx, HDATA*& hd)
|
||||
// don't check if idx is beyond the current high-water mark, because
|
||||
// we might be allocating a new entry. subsequent tag checks protect
|
||||
// against using unallocated entries.
|
||||
if(size_t(idx) >= hdata_cap) // also detects negative idx
|
||||
if(size_t(idx) >= size_t(hdata_cap)) // also detects negative idx
|
||||
WARN_RETURN(ERR::H_IDX_INVALID);
|
||||
|
||||
hd = (HDATA*)(hpool.da.base + idx*hpool.el_size);
|
||||
|
Loading…
Reference in New Issue
Block a user