mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 00:05:34 +00:00
bug fix
This commit is contained in:
parent
834db5ecc1
commit
354ff30b90
@ -10,11 +10,10 @@
|
||||
|
||||
|
||||
void GrabRole(Client*c);
|
||||
|
||||
void STCPSend(Client*c,std::any Data,size_t Size){
|
||||
int BytesSent;
|
||||
if(std::string(Data.type().name()).find("string") != std::string::npos){
|
||||
std::string data = std::any_cast<std::string>(Data);
|
||||
auto data = std::any_cast<std::string>(Data);
|
||||
BytesSent = send(c->GetTCPSock(), data.c_str(), data.size(), 0);
|
||||
}else{
|
||||
BytesSent = send(c->GetTCPSock(), std::any_cast<char*>(Data), Size, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user