File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -147,14 +147,20 @@ pub(crate) fn data_row_ui(
147147 cur_addr += diff. len ;
148148 } else {
149149 for byte in & diff. data {
150+ let mut byte_text = format ! ( "{byte:02x} " ) ;
150151 let mut byte_color = base_color;
151- if let Some ( reloc_diff) = reloc_diffs. iter ( ) . find ( |reloc_diff| {
152- reloc_diff. kind != DataDiffKind :: None
153- && reloc_diff. range . contains ( & cur_addr_actual)
154- } ) {
155- byte_color = get_color_for_diff_kind ( reloc_diff. kind , appearance) ;
152+ if let Some ( reloc_diff) = reloc_diffs
153+ . iter ( )
154+ . find ( |reloc_diff| reloc_diff. range . contains ( & cur_addr_actual) )
155+ {
156+ if * byte == 0 {
157+ // Display 00 data bytes with a relocation as ?? instead.
158+ byte_text = "?? " . to_string ( ) ;
159+ }
160+ if reloc_diff. kind != DataDiffKind :: None {
161+ byte_color = get_color_for_diff_kind ( reloc_diff. kind , appearance) ;
162+ }
156163 }
157- let byte_text = format ! ( "{byte:02x} " ) ;
158164 write_text ( byte_text. as_str ( ) , byte_color, & mut job, appearance. code_font . clone ( ) ) ;
159165 cur_addr += 1 ;
160166 cur_addr_actual += 1 ;
You can’t perform that action at this time.
0 commit comments