Hallo ich habe eine kleine frage also ich versuche es mit einem simple packet ("say Hello") aber das client crasht..Ich habe auch denn string null terminated gemacht aber immer noch das gleiche hier ein paar info über was ich gemacht habe:
English: I Tried to send a simple packet ("say Hello") but the client crashes , i dont know what to do i terminated the string with null ,i hope anyone can help me :) Here some info about what im doing:
Der call zu sendpacket:
English: I Tried to send a simple packet ("say Hello") but the client crashes , i dont know what to do i terminated the string with null ,i hope anyone can help me :) Here some info about what im doing:
Code:
void Player::send_packet(std::string packet)
{
DWORD callAdr = 0x52BC0C;
DWORD callPtr = 0x68120C;
char tempChar[256];
memcpy(tempChar,packet.c_str(), packet.size());
for (int i = 0; i < (packet.size()-1); i++)
{
tempChar[i] = packet[i];
}
tempChar[packet.size()] = 0;
char* temp = tempChar;
_asm
{
MOV EAX, DWORD PTR DS : [callPtr]
MOV EAX, DWORD PTR DS : [EAX]
MOV EDX, temp
CALL callAdr
}
return;
}
| Gallery | |
|
|
|