Skip to content

Commit

Permalink
Fix a small comparison bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
katajakasa committed May 3, 2023
1 parent 67207bc commit cb2aca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/io.c
Expand Up @@ -44,7 +44,7 @@ void file_read(FILE *handle, char *buffer, long size) {
abort();
}
read_size = min2(size - ptr, READ_BLOCK_SIZE);
if(read_size == 0)
if(read_size <= 0)
break;
ptr += fread(buffer + ptr, 1, read_size, handle);
}
Expand Down

0 comments on commit cb2aca1

Please sign in to comment.