Mercurial > emacs
changeset 50718:240f333f936c
(read_scores): Fix corruption of score files.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 27 Apr 2003 11:22:16 +0000 |
parents | 318f8d4ecf5a |
children | 3ec397b863e0 |
files | lib-src/update-game-score.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/update-game-score.c Sun Apr 27 11:09:53 2003 +0000 +++ b/lib-src/update-game-score.c Sun Apr 27 11:22:16 2003 +0000 @@ -357,7 +357,9 @@ scorecount++; if (scorecount >= cursize) { - ret = (struct score_entry *) realloc (ret, cursize *= 2); + cursize *= 2; + ret = (struct score_entry *) + realloc (ret, (sizeof (struct score_entry) * cursize)); if (!ret) return -1; }