file_readAll fix

This commit is contained in:
timerix 2023-01-20 16:42:19 +06:00
parent 73b199828c
commit cef4fe4002

View File

@ -86,7 +86,7 @@ Maybe file_readAll(File* file, char** allBytes){
uint64 i=0; uint64 i=0;
while(true){ while(true){
rezult=fgetc(file); rezult=fgetc(file);
if(rezult!=EOF){ if(rezult==EOF){
if(ferror(file)) if(ferror(file))
safethrow(ERR_IO,; StringBuilder_free(sb)); safethrow(ERR_IO,; StringBuilder_free(sb));
break; break;