Fix possible module index overlap.

This commit is contained in:
Unknown W. Brackets 2014-01-26 00:02:01 -08:00
parent 76afb2a8d5
commit 983e195dd2

View file

@ -443,7 +443,7 @@ u32 SymbolMap::GetModuleAbsoluteAddr(u32 relative, int moduleIndex) const {
int SymbolMap::GetModuleIndex(u32 address) const {
lock_guard guard(lock_);
auto iter = activeModuleEnds.lower_bound(address);
auto iter = activeModuleEnds.upper_bound(address);
if (iter == activeModuleEnds.end())
return -1;
return iter->second.index;