summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index aac8135a9..34c366a84 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2917,9 +2917,10 @@ int parse_frommap(int fd) {
return 0;
}
- if(pos) // If the player's already in the list, remove the entry and shift the following ones 1 step up
+ if(pos){ // If the player's already in the list, remove the entry and shift the following ones 1 step up
memmove(list + pos - 1, list + pos, (size - pos) * sizeof(struct fame_list));
list[size].fame = 0; // At worst, the guy'll end up last (shouldn't happen if fame only goes up)
+ }
for(i = 0; i < size; i++) // Find the position where the player has to be inserted
if(fame >= list[i].fame) { // When found someone with less or as much fame, insert just above