mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
GCC warnings fix
This commit is contained in:
parent
50aa5fdc70
commit
cc556bc19b
2 changed files with 17 additions and 4 deletions
|
|
@ -105,7 +105,11 @@ ImageData* _png_load(const char* file){
|
|||
if (!(f = fopen(file, "r"))) {
|
||||
return nullptr;
|
||||
}
|
||||
fread(header, 1, 8, f);
|
||||
if (fread(header, 1, 8, f) < 8) {
|
||||
fclose(f);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
is_png = !png_sig_cmp(header, 0, 8);
|
||||
if (!is_png) {
|
||||
fclose(f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue