Are there any good ways of splitting up a very long for loop or if statement in IDA into larger chunks to make it more readable? Disabling use fast structure analysis
in the Hex Rays decompiler options did not help. Nor did setting the Max commas
option to 1, as explained by Rolf Rolles in this Twitter post.
for ( i = four - 1; file_size > i + tmp + 1 && match_buffer(&buf[tmp], i + 1, buf_num, idx) != -1; ++i )
{
;
}
What I am trying to achieve is getting this on multiple lines. For reference I am using IDA Free v7.7 for Linux.
The equivalent in Ghidra looks like this and I was hoping to get the same result in IDA:
for (i = four - 1; tmp + i + 1 < file_size; i += 1) {
var1 = match_buffer(buf + tmp,i + 1,buf + num,tmp - num); // == match_buffer(buf[tmp], i + 1, buf[num], tmp - num);
if (var1 == -1)
break;
}