mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
Fixed handle leak when loading pattern file
Thanks @HookedBehemoth
This commit is contained in:
@@ -62,8 +62,10 @@ namespace hex {
|
||||
size_t size = ftell(file);
|
||||
rewind(file);
|
||||
|
||||
if (size > 0xFF'FFFF)
|
||||
if (size > 0xFF'FFFF) {
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
|
||||
fread(this->m_buffer, size, 1, file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user