Fixed overlay thread joining on himself

This commit is contained in:
Nemirtingas
2019-09-02 10:50:46 +02:00
parent aeeb85da55
commit 5af1d18a8f
2 changed files with 45 additions and 64 deletions

View File

@ -208,7 +208,7 @@ int find_space_for_trampoline(uint8_t* func, int bytes_needed)
if( func == nullptr )
return -1;
int code_len = -1;
int code_len = 0;
bool search = true;
uint8_t *startCode = reinterpret_cast<uint8_t*>(func);
uint8_t *pCode = startCode;