This commit is contained in:
tildearrow 2022-04-15 01:30:21 -05:00
parent 600c38543b
commit f9e9c6c179
1 changed files with 1 additions and 2 deletions

View File

@ -1621,14 +1621,13 @@ int FurnaceGUI::load(String path) {
fclose(f);
return 1;
}
unsigned char* file=new unsigned char[len];
if (fseek(f,0,SEEK_SET)<0) {
perror("size error");
lastError=fmt::sprintf("on get size: %s",strerror(errno));
fclose(f);
delete[] file;
return 1;
}
unsigned char* file=new unsigned char[len];
if (fread(file,1,(size_t)len,f)!=(size_t)len) {
perror("read error");
lastError=fmt::sprintf("on read: %s",strerror(errno));