Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2008, 4:30:15 AM (16 years ago)
Author:
landauf
Message:

removed some other (potential) bugs or dangerous code lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/network/PacketDecoder.cc

    r1064 r1438  
    176176    //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
    177177    if(currentState->compsize==0)
     178    {
    178179      COUT(2) << "compsize is 0" << std::endl;
     180    }
    179181    currentState->data = (unsigned char*)(malloc( currentState->compsize ));
    180182    if(currentState->data==NULL)
     183    {
    181184      COUT(2) << "Gamestatepacket-decoder: memory leak" << std::endl;
     185    }
    182186    //copy the GameStateCompressed data
    183187    //std::cout << "packet size (enet): " << packet->dataLength << std::endl;
     
    252256  {
    253257    if(clientId!=CLIENTID_CLIENT)
     258    {
    254259      COUT(5) << "client: " << clientId << std::endl;
     260    }
    255261    COUT(5) << "data id: " << data->id << std::endl;
    256262    COUT(5) << "data:    " << data->message << std::endl;
Note: See TracChangeset for help on using the changeset viewer.