mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
GUI: fix another cppcheck warning
This commit is contained in:
parent
be483470ef
commit
aa415caa57
1 changed files with 1 additions and 2 deletions
|
@ -1951,14 +1951,13 @@ bool FurnaceGUI::importLayout(String path) {
|
|||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
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 false;
|
||||
}
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue