summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/perk/perk_meta.h2
-rw-r--r--src/logic/pe_get_image_meta.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/perk/perk_meta.h b/include/perk/perk_meta.h
index be56485..7467c44 100644
--- a/include/perk/perk_meta.h
+++ b/include/perk/perk_meta.h
@@ -244,7 +244,7 @@ struct pe_meta_import_lookup {
uint16_t ii_ordinal_number;
} u;
- uint32_t ii_flags;
+ uint32_t ii_flag;
uint16_t ii_hint;
char * ii_name;
};
diff --git a/src/logic/pe_get_image_meta.c b/src/logic/pe_get_image_meta.c
index 37df3f7..7ec2b0b 100644
--- a/src/logic/pe_get_image_meta.c
+++ b/src/logic/pe_get_image_meta.c
@@ -468,15 +468,15 @@ int pe_get_image_meta(
switch (m->m_opt.oh_std.coh_magic) {
case PE_MAGIC_PE32:
- m->m_idata[i].ih_items[j].ii_flags = m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_32;
+ m->m_idata[i].ih_items[j].ii_flag = m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_32 >> 31;
break;
case PE_MAGIC_PE32_PLUS:
- m->m_idata[i].ih_items[j].ii_flags = (m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_64 >> 32);
+ m->m_idata[i].ih_items[j].ii_flag = (m->m_idata[i].ih_items[j].u.ii_import_lookup_entry_64 >> 63);
break;
}
- if (!m->m_idata[i].ih_items[j].ii_flags) {
+ if (!m->m_idata[i].ih_items[j].ii_flag) {
struct pe_raw_hint_name_entry * pentry =
(struct pe_raw_hint_name_entry *)(base + m->h_idata->sh_ptr_to_raw_data
+ m->m_idata[i].ih_items[j].u.ii_hint_name_tbl_rva - m->h_idata->sh_virtual_addr);