1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

(read_scores): Fix corruption of score files.

This commit is contained in:
Juanma Barranquero 2003-04-27 11:22:16 +00:00
parent 9d7ab3f0ee
commit ee435bae30

View file

@ -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;
}