kwilcz / Antario

Clean base/cheat made for CS:GO.
MIT License
133 stars 34 forks source link

Get rid of "static" #93

Open 48cf opened 5 years ago

48cf commented 5 years ago

As of now, most injectors (if not every injector) that offers "Manual map" injection method, while injecting the library will crash the target process.

The most obvious reason is the static keyword used in few places (for example Hooks::Present method, szWatermark variable, or all original hooked methods).

Looks like the "Manual map" injection method causes the static variables not to be initialized properly, and leads into crash.

image

Kind of a good solutions seems to be replacing them all with some kind of global variables container, that will be instantiated once cheat is injected, and before hooks are created, and released after hooks are restored.

DucaRii commented 5 years ago

thats because whatever mapper ur using isnt calling all tls callbacks and thus will leave them uninitialized. a proper mapper wont have this problem.