]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/gameserv.cpp
Fixed the bug that would cause a segfault when load_gs_dbase() was called. I was...
[irc/gameservirc.git] / gameserv / gameserv.cpp
index 5d49ef5d8dc916166140f31b640e873a64d5abf1..d9d696c7bbdc845a8c8c249a0a00f78620d3ba47 100644 (file)
@@ -1591,9 +1591,16 @@ int load_gs_dbase()
 
     while (infile.getline(buf, 1024, '\n'))
     {
+        cout << "temp = new aClient;" << endl << flush;
        temp = new aClient;
+       cout << "tempname = strtok(buf, " ");" << endl << flush;
        tempname = strtok(buf, " ");
+
+       cout << "temp->stats = new Player(tempname);" << endl << flush;
+
        temp->stats = new Player(tempname);
+
+       cout << "p = temp->stats;" << endl << flush;
        p = temp->stats;
 
        //Kain 1 1 0 500 10 10 0 0 1 1 alive 100 3
@@ -1619,8 +1626,11 @@ int load_gs_dbase()
        p->exp, p->gold, p->bank, p->hp, p->maxhp, p->strength, p->defense, p->armor, p->weapon, 
        alive, p->forest_fights, p->player_fights, p->password);
 
+       cout << "Inserting " << temp->stats->name << " at back of list" << endl;
        players.insertAtBack(temp);
+       cout << temp->stats->name << " Inserted, now deleting" << endl;
        delete temp;
+       cout << "Deleted" << endl;
     }
 delete buf;
 }