Fixed handle leak when loading pattern file
Thanks @HookedBehemoth
This commit is contained in:
parent
0dcf02f891
commit
295b32b890
@ -62,8 +62,10 @@ namespace hex {
|
|||||||
size_t size = ftell(file);
|
size_t size = ftell(file);
|
||||||
rewind(file);
|
rewind(file);
|
||||||
|
|
||||||
if (size > 0xFF'FFFF)
|
if (size > 0xFF'FFFF) {
|
||||||
|
fclose(file);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fread(this->m_buffer, size, 1, file);
|
fread(this->m_buffer, size, 1, file);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user