c++ Run-Time Check Failure #2 - Stack around the variable 'ToSend22' was corrupted
<p>I have no idea why is that happening - when ever I call this function I have and send TCP messages to the client, I've got this:
Run-Time Check Failure #2 - Stack around the variable 'ToSend22' was corrupted.
Whenever the client is disconnected. ToSend22 is STD string which I am doing </p>

<pre><code>const char *ToSend288 = ToSend22.c_str();
Client.Send(ToSend288, ToSend22.size());
</code></pre>

<p>Why is that happening? Thanks.</p>
