File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,10 @@ pub fn diff_data_section(
48
48
right_section_diff : & ObjSectionDiff ,
49
49
) -> Result < ( ObjSectionDiff , ObjSectionDiff ) > {
50
50
let deadline = Instant :: now ( ) + Duration :: from_secs ( 5 ) ;
51
- let left_max = left. symbols . iter ( ) . map ( |s| s. section_address + s. size ) . max ( ) . unwrap_or ( 0 ) ;
52
- let right_max = right. symbols . iter ( ) . map ( |s| s. section_address + s. size ) . max ( ) . unwrap_or ( 0 ) ;
51
+ let left_max =
52
+ left. symbols . iter ( ) . map ( |s| s. section_address + s. size ) . max ( ) . unwrap_or ( 0 ) . min ( left. size ) ;
53
+ let right_max =
54
+ right. symbols . iter ( ) . map ( |s| s. section_address + s. size ) . max ( ) . unwrap_or ( 0 ) . min ( right. size ) ;
53
55
let left_data = & left. data [ ..left_max as usize ] ;
54
56
let right_data = & right. data [ ..right_max as usize ] ;
55
57
let ops =
You can’t perform that action at this time.
0 commit comments