Bug-Fix: Fixed crash bug in remove_player where index entry is removed too early (thanks drefs)
This commit is contained in:
@@ -36,6 +36,7 @@ Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||
(lots of major bugfixes too)
|
||||
[Apr 11 2009] - Jamdog
|
||||
Bug-Fix: NPC check added to do_gen_ps function (thanks drefs)
|
||||
Bug-Fix: Fixed crash bug in remove_player where index entry is removed too early (thanks drefs)
|
||||
[Apr 06 2009] - Jamdog
|
||||
Bug-Fix: Changing a player name no longer allows two words (thanks Slicer)
|
||||
[Apr 05 2009] - Jamdog
|
||||
|
||||
@@ -786,9 +786,6 @@ void remove_player(int pfilepos)
|
||||
if (!*player_table[pfilepos].name)
|
||||
return;
|
||||
|
||||
/* Update index table. */
|
||||
remove_player_from_index(pfilepos);
|
||||
|
||||
/* Unlink all player-owned files */
|
||||
for (i = 0; i < MAX_FILES; i++) {
|
||||
if (get_filename(filename, sizeof(filename), i, player_table[pfilepos].name))
|
||||
@@ -799,6 +796,10 @@ void remove_player(int pfilepos)
|
||||
player_table[pfilepos].name, player_table[pfilepos].level,
|
||||
asctime(localtime(&player_table[pfilepos].last)));
|
||||
player_table[pfilepos].name[0] = '\0';
|
||||
|
||||
/* Update index table. */
|
||||
remove_player_from_index(pfilepos);
|
||||
|
||||
save_player_index();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user