SVN revision: 6735
Your patch looks perfect and tested just as nicely! Thank you!
For the record, I built TDM from latest SVN (#6735), with Hamlet's published patch to 'idlib/geometry/RenderMatrix.cpp' (because I like his patch better than mine) and with my published patch to the DevIL library header files (because, for now, I like my patch well enough) using 32-bit Slackware 14.2. The video card is a GeForce 7600GT with the nVidia 32-bit 304.132 driver.
I used the same 2 missions that I've been using for testing this: "Closemouthed Shadows" and "The Outpost". Both are running fine, so I can say with confidence that the patch is, unsurprisingly, working as intended.
I have not (yet) applied the patch to my 2.05-beta tree and built from that because I'm still finalizing my testing of Baal's Linux crashes and I don't want to corrupt that (local) tree any more than I already have. So give me another day to apply your patch to 2.05-beta, re-test (with more missions too), then I will report back, at which time I would "ack" the patch, FWIW, for inclusion into the official 2.05 tree in SVN.
Thanks again for the patch! One less GL "time bomb" awaiting the unwary!