What The Hell Does This Code Do?
Really, take your best shot:
value += ((LPWORD)&((WORD *)data)[1])[i];
It’s not all that complicated, it’s not intentionally deceptive, but it is confusing.
Such is life while working on a large project that you didn’t write. You will have to interpret and modify code without knowing how the rest of the code works. I guarentee that you will come across lines of code like this that will take you a minute or so to understand. It can be very tough to see a bug in a line that does more than one thing at a time, and it can be very risky to change a line of code that you don’t understand (hint hint: write readable code so future developers don’t suffer).