mirror of
https://github.com/serge1/ELFIO.git
synced 2024-12-27 12:17:28 +00:00
To make memory_size bigger than file_size, set memory_size prior calling 'save' function
This commit is contained in:
parent
b3b7aed245
commit
2cddbab258
@ -479,7 +479,8 @@ class elfio
|
||||
}
|
||||
|
||||
segments[i]->set_file_size( current_data_pos - current_file_pos );
|
||||
segments[i]->set_memory_size( current_data_pos - current_file_pos );
|
||||
segments[i]->set_memory_size( current_data_pos - current_file_pos +
|
||||
segments[i]->get_memory_size() );
|
||||
segments[i]->save( f, (std::streamoff)segment_header_position, (std::streamoff)current_file_pos );
|
||||
current_file_pos = current_data_pos;
|
||||
segment_header_position += header->get_segment_entry_size();
|
||||
|
Loading…
Reference in New Issue
Block a user