Skip to content

Commit ebe3164

Browse files
committed
Fix the segment::get_data() logic when data is already loaded
Signed-off-by: Sonal Santan <[email protected]>
1 parent 87f93ad commit ebe3164

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

elfio/elfio_segment.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ template <class T> class segment_impl : public segment
194194
{
195195
if ( !is_loaded ) {
196196
load_data();
197-
}
198-
// If data is in the matched sections, create a contiguous representation
199-
// of data by copying over from sections.
200-
if ( get_sections_num() ) {
201-
load_section_data();
197+
// If data is in the matched sections, create a contiguous
198+
// representation of data by copying over from sections.
199+
if ( get_sections_num() ) {
200+
load_section_data();
201+
}
202202
}
203203
return data.get();
204204
}

0 commit comments

Comments
 (0)