[CPU] Fix off-by-one in max ordinals check

This commit is contained in:
Silent
2019-09-08 22:21:32 +02:00
committed by Rick Gibbed
parent 9205a6b062
commit f775fe8c83
2 changed files with 2 additions and 2 deletions

View File

@@ -127,7 +127,7 @@ uint32_t XexModule::GetProcAddress(uint16_t ordinal) const {
xex_security_info()->export_table);
ordinal -= export_table->base;
if (ordinal > export_table->count) {
if (ordinal >= export_table->count) {
XELOGE("GetProcAddress({:03X}): ordinal out of bounds", ordinal);
return 0;
}