Kaynağa Gözat

fix cast problem

Kolja Strohm 3 yıl önce
ebeveyn
işleme
b39001ff1a
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 1 1
      Network/Klient.cpp
  2. 1 1
      Network/Server.cpp

+ 1 - 1
Network/Klient.cpp

@@ -127,7 +127,7 @@ bool Klient::sendeEncrypted( const char *nachricht, int len ) // sendet zum Serv
     if( !sendeKey )
         return sende( nachricht, len );
     Encryption::Bytes *n = new Encryption::Bytes( nachricht, len );
-    sendeKey->codieren( (Framework::Encryption::Bytes *)n->getThis() );
+    sendeKey->codieren( dynamic_cast<Framework::Encryption::Bytes *>( n->getThis() ) );
     int ll = 0;
     while( len > 0 )
     {

+ 1 - 1
Network/Server.cpp

@@ -195,7 +195,7 @@ bool SKlient::sendeEncrypted( const char *nachricht, int len ) // sendet zum Ser
     if( !sendeKey )
         return sende( nachricht, len );
     Encryption::Bytes *n = new Encryption::Bytes( nachricht, len );
-    sendeKey->codieren( (Encryption::Bytes *)n->getThis() ); int ll = 0;
+    sendeKey->codieren( dynamic_cast<Encryption::Bytes *>( n->getThis() ) ); int ll = 0;
     while( len > 0 )
     {
 #ifdef WIN32