Skip to content

Commit

Permalink
Fix expected bytes from fread()
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbutuseless authored Jan 31, 2024
1 parent 58d0169 commit b31b22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/R-yyjson-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ SEXP parse_from_gzfile_(SEXP filename_, SEXP parse_opts_) {

fseek(fp, -4, SEEK_END);
int32_t uncompressed_len;
size_t nbytes = fread(&uncompressed_len, 4, 1, fp);
size_t nbytes = fread(&uncompressed_len, 1, 4, fp);
fclose(fp);
if (nbytes != 4) {
error("Couldn't read size from end of file: %s", filename);
Expand Down

0 comments on commit b31b22d

Please sign in to comment.