Skip to content

Commit

Permalink
actually fix maps_obj index in maps_entry (for real this time :p)
Browse files Browse the repository at this point in the history
  • Loading branch information
vykt committed Mar 20, 2024
1 parent 7139d04 commit 579fa64
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libpwu/process_maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int build_obj_vector(maps_data * m_data) {
if (ret == -1) return -1;

//set the maps_data.obj_vector index for this maps_entry
temp_m_entry->obj_vector_index = temp_m_obj.next_entry_index;
temp_m_entry->obj_vector_index = m_data->obj_vector.length - 1;

//if the name matches an object entry already present
} else {
Expand All @@ -72,6 +72,7 @@ int build_obj_vector(maps_data * m_data) {

//set the obj_index value for this maps_entry
temp_m_entry->obj_index = temp_m_obj_ref->next_entry_index;
temp_m_entry->obj_vector_index = pos;

//increment next_entry_index for this maps_obj
temp_m_obj_ref->next_entry_index += 1;
Expand All @@ -80,9 +81,6 @@ int build_obj_vector(maps_data * m_data) {
ret = vector_add(&temp_m_obj_ref->entry_vector, 0, (byte *) &temp_m_entry,
APPEND_TRUE);
if (ret == -1) return -1;

//set the maps_data.obj_vector index for this maps_entry
temp_m_entry->obj_vector_index = m_data->obj_vector.length - 1;
}

}// for every maps entry
Expand Down

0 comments on commit 579fa64

Please sign in to comment.