read into pointer, not addr of pointer
This commit is contained in:
parent
a038abbce9
commit
254eeb3650
2
stl_3d.c
2
stl_3d.c
@ -76,7 +76,7 @@ stl_3d_parse(
|
|||||||
const size_t file_len = num_triangles * sizeof(*fts);
|
const size_t file_len = num_triangles * sizeof(*fts);
|
||||||
fts = calloc(1, file_len);
|
fts = calloc(1, file_len);
|
||||||
|
|
||||||
rc = read(fd, &fts, file_len);
|
rc = read(fd, fts, file_len);
|
||||||
if (rc < 0 || (size_t) rc != file_len)
|
if (rc < 0 || (size_t) rc != file_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user