|
@@ -805,10 +805,9 @@ void Spiel::stknVerarbeitung()
|
|
break;
|
|
break;
|
|
case 7: // chat nachricht
|
|
case 7: // chat nachricht
|
|
{
|
|
{
|
|
- unsigned char len = (unsigned char)* msg;
|
|
|
|
- char *buf = new char[ (__int64)len + 1 ];
|
|
|
|
- memcpy( buf, msg + 1, len );
|
|
|
|
- buf[ len ] = 0;
|
|
|
|
|
|
+ char *buf = new char[ (__int64)n->getLength() ];
|
|
|
|
+ memcpy( buf, msg + 1, n->getLength() - 1 );
|
|
|
|
+ buf[ n->getLength() - 1 ] = 0;
|
|
chat->addNachricht( buf );
|
|
chat->addNachricht( buf );
|
|
delete[] buf;
|
|
delete[] buf;
|
|
n->setVerarbeitet();
|
|
n->setVerarbeitet();
|