diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2003-04-27 11:22:16 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2003-04-27 11:22:16 +0000 |
commit | 84b1af00ad36e464785d5afc0957b700e48952fc (patch) | |
tree | c404194c7c519ecc1b4251924fe68f56acc20390 /lib-src | |
parent | b8355ed96165df8d45cac8ed7ddbeb2095b9d005 (diff) | |
download | emacs-84b1af00ad36e464785d5afc0957b700e48952fc.tar.gz |
(read_scores): Fix corruption of score files.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/update-game-score.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 55737c542d7..2a699b2550d 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -357,7 +357,9 @@ read_scores (filename, scores, count) 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; } |