In this decompiled code, does psVar8[-6]
refer to 6*sizeof(psVar8) == 12
bytes before psVar8
?
psVar8 = (short *)(&DAT_1412345b4 + named_index * 0x20);
do {
if (psVar8[-6] == 0) break;
// ...
} while (lVar10 < 6);
It would seem more intuitive to me if the position of psVar8
was earlier to avoid the negative index. Is there a way to change this in the decompiled code, or a reason not to?
I'm attaching the entire loop in case that is important to the question:
do {
if (psVar8[-6] == 0) break;
if (psVar8[-6] == 4) {
named_variable = 0;
if (0 < *psVar8) {
named_variable = (int)*psVar8;
}
iVar4 = 0x1d;
if (named_variable < 0x1d) {
iVar4 = named_variable;
}
*(undefined2 *)(&DAT_145678900 + (longlong)iVar4 * 2) = 1;
}
lVar10 += 1;
psVar8 = psVar8 + 1;
} while (lVar10 < 6);