From b1de3921728d3af4fb8647d641cbfca0b83de92d Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 10 Jul 2013 12:57:06 +0000 Subject: [PATCH] acro plugin: Don't sort scores when saving to file. This was losing the head of the list, and it's not necessary anyway. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@264 13b04d17-f746-0410-82c6-800466cd88b0 --- dll/acro/acro.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dll/acro/acro.c b/dll/acro/acro.c index 79b61de..634de94 100644 --- a/dll/acro/acro.c +++ b/dll/acro/acro.c @@ -352,15 +352,18 @@ void read_scores(void) int write_scores(srec *tmp) { FILE *sf; + if (!tmp) return 0; - tmp = sort_scores(tmp); + sf = fopen(SCOREFILE, "w"); if (!sf) return 0; + for (; tmp; tmp = tmp->next) if (tmp->score > 0) fprintf(sf, "%s,%lu\n", tmp->nick, tmp->score); + fclose(sf); return 1; }