mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-26 19:06:10 +01:00
Bug-Fix: Fixed crash bug in remove_player where index entry is removed too early (thanks drefs)
This commit is contained in:
parent
3e2851cc8b
commit
97661bb017
2 changed files with 5 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue