Soft'N'Design Software
/
projects
/
scrabble.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
376d066
)
fix errors reported by valgrind
author
Laurent Mazet
<mazet@softndesign.org>
Wed, 19 Jun 2024 10:17:14 +0000
(12:17 +0200)
committer
Laurent Mazet
<mazet@softndesign.org>
Wed, 19 Jun 2024 10:17:14 +0000
(12:17 +0200)
function.c
patch
|
blob
|
blame
|
history
diff --git
a/function.c
b/function.c
index 692c52fc1910345debdba905d544222bd2d54df9..f217027515ea6373d90039cf6972df57f5fa52fa 100644
(file)
--- a/
function.c
+++ b/
function.c
@@
-104,6
+104,7
@@
draw_t *newdraw (int nbtiles)
CHECKALLOC (draw->tiles);
memset (draw->tiles, ' ', nbtiles);
draw->nbtiles = nbtiles;
+ draw->index = -1;
return draw;
}
@@
-609,7
+610,7
@@
char *loaddata (char *filename)
if (fd) {
fseek (fd, 0, SEEK_END);
int size = ftell (fd);
- buffer = (char *) calloc (size, 1);
+ buffer = (char *) calloc (size
+ 1
, 1);
CHECKALLOC (buffer);
fseek (fd, 0, SEEK_SET);