Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision 01d0d00fb7dee4cce49bbe592263e06a8f891060)
+++ common/Player.cpp	(revision 11062102ef714b823a46ff973138fe9bbfe4bb1a)
@@ -53,11 +53,23 @@
    ostringstream oss;
 
+   cout << "Player name: " << this->name << endl;
+
+   /*
    oss.write((char*)&(this->id), sizeof(int));
    oss << this->name;
+   cout << "first oss str: " << oss.str() << endl;
    oss.write("\0", 1);
+   cout << "second oss str: " << oss.str() << endl;
    oss.write((char*)&(this->pos.x), sizeof(int));
+   cout << "third oss str: " << oss.str() << endl;
    oss.write((char*)&(this->pos.y), sizeof(int));
+   */
 
-   memcpy(buffer, oss.str().c_str(), this->name.length()+1+2*sizeof(int));
+   oss << this->id;
+   oss << this->name;
+   css << this->pos.x;
+   css << this->pos.y;
+
+   memcpy(buffer, oss.str().c_str(), oss.str().length);
 }
 
@@ -67,8 +79,15 @@
    iss.str(buffer);
 
+   /*
    iss.read((char*)&(this->id), sizeof(int));
    iss >> this->name;
    iss.read((char*)&(this->pos.x), sizeof(int));
    iss.read((char*)&(this->pos.y), sizeof(int));
+   */
+
+   iss >> this.id;
+   iss >> this->name;
+   iss >> this->pos.x;
+   iss >> this->pos.y;
 }
 
