ReClassNET / ReClass.NET

More than a ReClass port to the .NET platform.
MIT License
1.82k stars 372 forks source link

multibyte conversion to unicode leads to crash #87

Open undexedcheater opened 5 years ago

undexedcheater commented 5 years ago

i've tried to attach reclass to an certain game and it crashed, then i debugged and found that it crashes here:

const auto temp = converter{}.from_bytes(src + srcOffset); at ReclassNET_plugin.hpp line 285

i've only able to fix the problem using the MultiByteToWideChar API with CP_ACP option.

here's my fix for now:

unsigned long minSize = ::MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0);

::MultiByteToWideChar(CP_ACP, 0, src, -1, ( LPWSTR )dst, minSize);
KN4CK3R commented 5 years ago

Which game? When did it crash (after which action in ReClass.NET)?

Btw, you forgot srcOffset.

undexedcheater commented 5 years ago

CrossFire NA version, right when i attach into the game, using the last stable release and the last commited version too.

KN4CK3R commented 5 years ago

How do you prevent Xigncode from blocking ReClass.NET? Do you use the HandleAbuser plugin?

undexedcheater commented 5 years ago

https://github.com/VirtualPuppet/XignCode3-bypass works for atleast 5 minutes which is enought for me, btw xigncode isnt too aggressive in crossfire anyway.