1.1 --- a/sourcemm/CSmmAPI.cpp Wed Mar 21 17:54:17 2007 +0000
1.2 +++ b/sourcemm/CSmmAPI.cpp Mon Mar 26 19:44:04 2007 +0000
1.3 @@ -553,6 +553,19 @@
1.4 vfunc = vtable[info.vtblindex];
1.5 }
1.6
1.7 + /* Oh dear, we have a relative jump on our hands
1.8 + * PVK II on Windows made me do this, but I suppose it doesn't hurt to check this on Linux too...
1.9 + */
1.10 + if (*vfunc == '\xE9')
1.11 + {
1.12 + /* Get address from displacement...
1.13 + *
1.14 + * Add 5 because it's relative to next instruction:
1.15 + * Opcode <1 byte> + 32-bit displacement <4 bytes>
1.16 + */
1.17 + vfunc = vfunc + *reinterpret_cast<unsigned int *>(vfunc + 1) + 5;
1.18 + }
1.19 +
1.20 UserMsgDict *dict = NULL;
1.21
1.22 if (vcmp(vfunc, MSGCLASS_SIG, MSGCLASS_SIGLEN))