HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d7ab3f
)
(read_scores): Fix corruption of score files.
author
Juanma Barranquero
<lekktu@gmail.com>
Sun, 27 Apr 2003 11:22:16 +0000
(11:22 +0000)
committer
Juanma Barranquero
<lekktu@gmail.com>
Sun, 27 Apr 2003 11:22:16 +0000
(11:22 +0000)
lib-src/update-game-score.c
patch
|
blob
|
blame
|
history
diff --git
a/lib-src/update-game-score.c
b/lib-src/update-game-score.c
index
55737c5
..
2a699b2
100644
(file)
--- 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;
}