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:
parent
9d7ab3f0ee
commit
ee435bae30
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue