diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-22 18:03:05 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-22 18:07:41 +0100 |
commit | 5eb7b6f431aa821684c7208d9a42779ba7002bec (patch) | |
tree | 06af95972ef77e6a4dfd5b9f20e5a300b5d5b02d /src | |
parent | 5ee9bfaca860d8421b9c75267bcb2c2422efd394 (diff) | |
download | ovm-5eb7b6f431aa821684c7208d9a42779ba7002bec.tar.gz ovm-5eb7b6f431aa821684c7208d9a42779ba7002bec.tar.bz2 ovm-5eb7b6f431aa821684c7208d9a42779ba7002bec.zip |
Fix bug where FILE is closed when passing to darr_(write|read)
Diffstat (limited to 'src')
-rw-r--r-- | src/darr.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -61,7 +61,6 @@ byte darr_at(darr_t *darr, size_t index) void darr_write_file(darr_t *bytes, FILE *fp) { size_t size = fwrite(bytes->data, bytes->used, 1, fp); - fclose(fp); assert(size == 1); } @@ -73,7 +72,6 @@ darr_t darr_read_file(FILE *fp) darr_init(&darr, size); fseek(fp, 0, SEEK_SET); size_t read = fread(darr.data, size, 1, fp); - fclose(fp); assert(read == 1); return darr; } |