encounter / objdiff

A local diffing tool for decompilation projects
Apache License 2.0
125 stars 21 forks source link

Local static variables with same name not diffed properly #85

Closed LagoLunatic closed 3 months ago

LagoLunatic commented 4 months ago

The new feature added in beta.1 to detect that name$1234 and name$4321 are the same variable works well in most cases, the only issue is that in the edge case when a single section has multiple different variables with the same name but different numbers, objdiff seems to match the pairs up together incorrectly.

Example from d_a_player_main's .rodata section: image

ripple_scale$8193 and ripple_scale$2352 are the same variable and should match, but objdiff shows 100% on the left and 75% on the right. ripple_scale$21928 and ripple_scale$4891 are the same variable and should match, but objdiff shows 75% on the left and no percentage on the right. Same with offset$39104/offset$8598 and offset$39108/offset$8599. All should show 100% because the bytes do match in the data view.

encounter commented 3 months ago

Fixed in e1ccee1e73d1828f95a53a139e5e14038df58365