Merge branch 'master' of https://github.com/alliedmodders/sourcemod
This commit is contained in:
commit
71cb002bc1
@ -4,6 +4,8 @@
|
|||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define REG_EAX 0
|
#define REG_EAX 0
|
||||||
#define REG_ECX 1
|
#define REG_ECX 1
|
||||||
@ -23,9 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
void check_thunks(unsigned char *dest, unsigned char *pc)
|
void check_thunks(unsigned char *dest, unsigned char *pc)
|
||||||
{
|
{
|
||||||
#if defined WIN32
|
#ifndef WIN32
|
||||||
return;
|
|
||||||
#else
|
|
||||||
/* Step write address back 4 to the start of the function address */
|
/* Step write address back 4 to the start of the function address */
|
||||||
unsigned char *writeaddr = dest - 4;
|
unsigned char *writeaddr = dest - 4;
|
||||||
unsigned char *calloffset = *(unsigned char **)writeaddr;
|
unsigned char *calloffset = *(unsigned char **)writeaddr;
|
||||||
@ -62,6 +62,10 @@ void check_thunks(unsigned char *dest, unsigned char *pc)
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
printf("Unknown thunk: %c\n", *(calladdr+1));
|
||||||
|
#ifndef NDEBUG
|
||||||
|
abort();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -78,8 +82,6 @@ void check_thunks(unsigned char *dest, unsigned char *pc)
|
|||||||
*(void **)writeaddr = (void *)pc;
|
*(void **)writeaddr = (void *)pc;
|
||||||
writeaddr += 4;
|
writeaddr += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
void add(Insert &i, U &&value)
|
bool add(Insert &i, U &&value)
|
||||||
{
|
{
|
||||||
return table_.add(i, ke::Forward<U>(value));
|
return table_.add(i, ke::Forward<U>(value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user